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:
namestatustrigger_keytrigger_idtrigger_instance_keytrigger_methodtrigger_ownerpipelinespayload
Note: The voice in this video is AI-generated, not original.
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 resource. | "notification-demo-payload" |
status | Int | Execution 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_key | String | Key of the trigger resource. | "P-ABC-0001" |
trigger_id | String | Identifier of the concrete trigger instance under the trigger resource. | "033CE" |
trigger_instance_key | String | Key of the concrete trigger instance. | "P-ABC-0001-033CE" |
trigger_method | String, enum | Indicates the type of the trigger. Enum: plan, gatekeeper, manual_trigger. | "plan" |
trigger_owner | []String | The list of trigger resource owners. | ["[email protected]"] |
pipelines | []Pipeline | The list of executed pipelines. | See table 3 |
payload | String | Optional 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
| Key | Type | Explain | Example |
|---|---|---|---|
name | String | Name of the pipeline | "demo-for-event" |
status | Int | Execution 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 |
key | String | Key of the pipeline. | "ABC-0001" |
owner | []String | The list of pipeline owners. | ["[email protected]"] |
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 | Execution 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_index | Int | Zero-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 |
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. | ["[email protected]"] |
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
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.