Skip to main content
Skip table of contents

Understanding the Payload of a Notification Webhook

Testany notification system will use the following data format to notify the opponent via webhook dispatch.

Table 1: Basic information on the payload request

HTTP version

HTTP/1.1

Request method

POST, comply with RFC2616

TLS verification

Strict, if provided

MIME type

application/json

Timeout

15 seconds

Retries

3 times

Body

See table 2

Table 2: Payload body data format

Key

Type

Explain

Example

name

String

Name of the trigger.

"notification-demo-payload"

status

Int

Trigger execution status:

  • 1 Success

  • 2 Failure

1

trigger_key

String

Key of the trigger.

"P-ABC-0001"

trigger_method

String, enum

Indicating the type of the trigger.

Enum:

  • plan

  • gatekeeper

"plan"

trigger_owner

[]String

The list of trigger resource owners.

["john.doe@acme.tld"]

pipelines

[]Pipeline

The list of executed pipelines.

See table 3

Table 3: Pipeline data format

Key

Type

Explain

Example

name

String

Name of the pipeline

"demo-for-event"

status

Int

Pipeline execution status:

  • 1 Success

  • 2 Failure

1

key

String

Key of the pipeline.

"ABC-0001"

owner

[]String

The list of pipeline owners.

["john.doe@acme.tld"]

cases

[]Case

The list of cases execution results that the pipeline uses.

See table 4

duration

Int

The duration of the pipeline execution, unit is second

22

execution_key

String

The pipeline execution identifier.

"ABC-0001-033CE"

start_time

String, timestamp

RFC3339 timestamp, indicating the start time of the pipeline execution.

"2006-01-02T15:04:05Z"

finish_time

String, timestamp

RFC3339 timestamp, indicating the finish time of the pipeline execution.

"2006-01-02T15:04:05Z"

Table 4: Case data format

Key

Type

Explain

Example

name

String

Name of the test case

"check-notification-active"

status

Int

Test case execution status:

  • 1 Passed

  • 2 Failed

  • 3 Skipped

  • 4 Fail as expected

1

key

String

Key of the test case.

"00000000"

runtime_uuid

String

A unique identifier for the runtime instance where the case is executed.

"00000000-0000-0000-0000-000000000000"

runtime_name

String

A unique name for the runtime instance where the case is executed.

"CloudPrime-Default"

owner

[]String

The list of test case owners.

["john.doe@acme.tld"]

duration

Int

The duration of the test case execution, unit is second

6

env

String

The environment of the test case.

"DEMO"

start_time

String, timestamp

RFC3339 timestamp, indicating the start time of the test case execution.

"2006-01-02T15:04:05Z"

finish_time

String, timestamp

RFC3339 timestamp, indicating the finish time of the test case execution.

"2006-01-02T15:04:05Z"

Examples

Example of a plan execution result
CODE
{
  "name": "notification-demo-payload",
  "pipelines": [
    {
      "cases": [
        {
          "duration": 6,
          "env": "DEMO",
          "finish_time": "2006-01-02T15:04:05Z",
          "key": "00000000",
          "name": "check-notification-active",
          "owner": [
            "john.doe@acme.tld"
          ],
          "start_time": "2006-01-02T15:04:05Z",
          "status": 1,
          "runtime_uuid": "00000000-0000-0000-0000-000000000000",
          "runtime_name": "CloudPrime-Default"
        }
      ],
      "duration": 22,
      "execution_key": "ABC-0001-033CE",
      "finish_time": "2006-01-02T15:04:05Z",
      "key": "ABC-0001",
      "name": "demo-for-event",
      "owner": [
        "john.doe@acme.tld"
      ],
      "start_time": "2006-01-02T15:04:05Z",
      "status": 1
    }
  ],
  "status": 1,
  "trigger_key": "P-ABC-0001",
  "trigger_method": "plan",
  "trigger_owner": [
    "john.doe@acme.tld"
  ]
}

 

Example of a gatekeeper execution result
CODE
{
  "name": "notification-demo-payload",
  "pipelines": [
    {
      "cases": [
        {
          "duration": 6,
          "env": "DEMO",
          "finish_time": "2006-01-02T15:04:05Z",
          "key": "00000000",
          "name": "check-notification-active",
          "owner": [
            "john.doe@acme.tld"
          ],
          "start_time": "2006-01-02T15:04:05Z",
          "status": 1,
          "runtime_uuid": "00000000-0000-0000-0000-000000000000",
          "runtime_name": "CloudPrime-Default"
        }
      ],
      "duration": 22,
      "execution_key": "ABC-0001-033CE",
      "finish_time": "2006-01-02T15:04:05Z",
      "key": "ABC-0001",
      "name": "demo-for-event",
      "owner": [
        "john.doe@acme.tld"
      ],
      "start_time": "2006-01-02T15:04:05Z",
      "status": 1
    }
  ],
  "status": 1,
  "trigger_key": "G-ABC-0001",
  "trigger_method": "gatekeeper",
  "trigger_owner": [
    "john.doe@acme.tld"
  ]
}

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.