Understanding the Payload of a Notification Webhook

Testany notification system uses the following compact JSON payload for webhook dispatch. The webhook body is the current Notification Gateway -> mailman-plugin projection of execution event data. At the top level, the payload currently contains these keys:

  • name
  • status
  • trigger_key
  • trigger_id
  • trigger_instance_key
  • trigger_method
  • trigger_owner
  • pipelines
  • payload

Note: The voice in this video is AI-generated, not original.

Table 1: Basic information on the payload request

HTTP versionHTTP/1.1
Request methodPOST, comply with RFC2616
TLS verificationStrict, if provided
MIME typeapplication/json
Timeout15 seconds
Retries3 times
BodySee table 2

Table 2: Payload body data format

KeyTypeExplainExample
nameStringName of the trigger resource."notification-demo-payload"
statusIntExecution status code of the trigger instance. For completed notifications, common terminal values are 1 Success, 2 Failure, 3 Skipped, 5 Cancelled, and 99 Error. Historical or non-terminal values can include -1 Not Started and 0 Running.1
trigger_keyStringKey of the trigger resource."P-ABC-0001"
trigger_idStringIdentifier of the concrete trigger instance under the trigger resource."033CE"
trigger_instance_keyStringKey of the concrete trigger instance."P-ABC-0001-033CE"
trigger_methodString, enumIndicates the type of the trigger. Enum: plan, gatekeeper, manual_trigger."plan"
trigger_owner[]StringThe list of trigger resource owners.["[email protected]"]
pipelines[]PipelineThe list of executed pipelines.See table 3
payloadStringOptional custom payload forwarded from the trigger source. It is passed through as an opaque string. If no custom payload is available, this field is an empty string."opaque-string-payload"

Table 3: Pipeline data format

KeyTypeExplainExample
nameStringName of the pipeline"demo-for-event"
statusIntExecution status code of the pipeline. Common terminal values are 1 Success, 2 Failure, 3 Skipped, 5 Cancelled, and 99 Error. Non-terminal values can include -1 Not Started and 0 Running.1
keyStringKey of the pipeline."ABC-0001"
owner[]StringThe list of pipeline owners.["[email protected]"]
cases[]CaseThe list of cases execution results that the pipeline uses.See table 4
durationIntThe duration of the pipeline execution, unit is second22
execution_keyStringThe pipeline execution identifier."ABC-0001-033CE"
start_timeString, timestampRFC3339 timestamp, indicating the start time of the pipeline execution."2006-01-02T15:04:05Z"
finish_timeString, timestampRFC3339 timestamp, indicating the finish time of the pipeline execution."2006-01-02T15:04:05Z"

Table 4: Case data format

KeyTypeExplainExample
nameStringName of the test case"check-notification-active"
statusIntExecution status code of the test case. Common terminal values are 1 Passed, 2 Failed, 3 Skipped, 4 Fail as expected, 5 Cancelled, and 99 Error. Non-terminal values can include -1 Not Started and 0 Running.1
case_indexIntZero-based position of the case execution within the pipeline execution detail. This can be used together with execution_key to open the corresponding case execution log.0
keyStringKey of the test case."00000000"
runtime_uuidStringA unique identifier for the runtime instance where the case is executed."00000000-0000-0000-0000-000000000000"
runtime_nameStringA unique name for the runtime instance where the case is executed."CloudPrime-Default"
owner[]StringThe list of test case owners.["[email protected]"]
durationIntThe duration of the test case execution, unit is second6
envStringThe environment of the test case."DEMO"
start_timeString, timestampRFC3339 timestamp, indicating the start time of the test case execution."2006-01-02T15:04:05Z"
finish_timeString, timestampRFC3339 timestamp, indicating the finish time of the test case execution."2006-01-02T15:04:05Z"

Examples

Example of a plan execution result

JSON
{
  "name": "notification-demo-payload",
  "pipelines": [
    {
      "cases": [
        {
          "case_index": 0,
          "duration": 6,
          "env": "DEMO",
          "finish_time": "2006-01-02T15:04:05Z",
          "key": "00000000",
          "name": "check-notification-active",
          "owner": [
            "[email protected]"
          ],
          "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": [
        "[email protected]"
      ],
      "start_time": "2006-01-02T15:04:05Z",
      "status": 1
    }
  ],
  "payload": "opaque-string-payload",
  "status": 1,
  "trigger_key": "P-ABC-0001",
  "trigger_id": "033CE",
  "trigger_instance_key": "P-ABC-0001-033CE",
  "trigger_method": "plan",
  "trigger_owner": [
    "[email protected]"
  ]
}

Example of a gatekeeper execution result

JSON
{
  "name": "notification-demo-payload",
  "pipelines": [
    {
      "cases": [
        {
          "case_index": 0,
          "duration": 6,
          "env": "DEMO",
          "finish_time": "2006-01-02T15:04:05Z",
          "key": "00000000",
          "name": "check-notification-active",
          "owner": [
            "[email protected]"
          ],
          "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": [
        "[email protected]"
      ],
      "start_time": "2006-01-02T15:04:05Z",
      "status": 1
    }
  ],
  "payload": "opaque-string-payload",
  "status": 1,
  "trigger_key": "G-ABC-0001",
  "trigger_id": "033CE",
  "trigger_instance_key": "G-ABC-0001-033CE",
  "trigger_method": "gatekeeper",
  "trigger_owner": [
    "[email protected]"
  ]
}

Example of a manual trigger execution result

JSON
{
  "name": "manual-rerun-demo",
  "pipelines": [
    {
      "cases": [
        {
          "case_index": 0,
          "duration": 6,
          "env": "DEMO",
          "finish_time": "2006-01-02T15:04:05Z",
          "key": "00000000",
          "name": "check-notification-active",
          "owner": [
            "[email protected]"
          ],
          "start_time": "2006-01-02T15:04:05Z",
          "status": 1,
          "runtime_uuid": null,
          "runtime_name": null
        }
      ],
      "duration": 22,
      "execution_key": "ABC-0001-033CE",
      "finish_time": "2006-01-02T15:04:05Z",
      "key": "ABC-0001",
      "name": "demo-for-event",
      "owner": [
        "[email protected]"
      ],
      "start_time": "2006-01-02T15:04:05Z",
      "status": 1
    }
  ],
  "payload": "",
  "status": 1,
  "trigger_key": "M-ABC-0001",
  "trigger_id": "033CE",
  "trigger_instance_key": "M-ABC-0001-033CE",
  "trigger_method": "manual_trigger",
  "trigger_owner": [
    "[email protected]"
  ]
}

Still have questions?

Our team is here to help. Get in touch and we'll get back to you as soon as possible.