Webhooks
Webhooks are user-defined POST callbacks that allow you to receive notifications as soon as certain events occur. For example, webhooks can be defined in qTest to notify you when an internal Defect is submitted. Webhooks provide you with immediate notifications when events happen, rather than having to wait until qTest periodically polls for changes. In addition, webhooks in qTest support both HTTP and HTTPS, based on the registered URL.
For example, suppose you have ordered a cake and are waiting to pick the cake up from the bakery. Rather than calling the bakery multiple times and asking whether the cake is ready, similar to polling, you can think of a webhook as a notification system that will give you a call as soon as the cake is finished.
Webhooks in qTest are configured and managed using APIs. Using the APIs, you can register a new webhook, view a list of all registered webhooks, modify an existing webhook, and delete a webhook.
Register a new webhook
To receive notifications from a webhook, the webhook must be registered. To register a new webhook using an API:
- POST /api/v3/webhooks
When you register a webhook, you can also specify a Secret Key, which can be used to authenticate the payload received from a webhook. When a Secret Key is set for a webhook, qTest creates a hash signature with each payload that is passed along with each event in the header: "x-qTest-signature". A returned payload should include the Secret Key in the header if the payload is valid.
View a list of registered webhooks
To view a list of all registered webhooks using an API:
- GET /api/v3/webhooks
Modify a webhook
To modify a webhook using an API:
-
PUT /api/v3/webhooks/<webhook ID>
Delete a webhook
To delete a webhook using an API:
-
DELETE /api/v3/webhooks/<webhook ID>
Available webhook events
Following are the available webhook events, listed by object type. You can also view a list of all supported webhook events using the following API:
- GET /api/v3/webhooks/events
Defects
Event | Notification | Sample payload |
---|---|---|
defect_modified | A defect is updated in qTest |
Copy
|
defect_submited |
A new internal defect is submitted in qTest Note: If an external defect tracking integration is enabled, this event is disabled. |
Copy
|
Projects
Event | Notification | Sample payload |
---|---|---|
project_created | A new project is created in qTest |
Copy
|
project_updated | A project is updated in qTest |
Copy
|
Test cases
Event | Notification | Sample payload |
---|---|---|
testcase_created | A new test case is created in qTest |
Copy
|
testcase_deleted | A test case is deleted in qTest |
Copy
|
testcase_updated |
A test case is updated in qTest, including:
|
Copy
|
Test logs
Event | Notification | Sample payload |
---|---|---|
testlog_modified | A test log is updated in qTest |
Copy
|
testlog_submitted | A new test log, either manual or automation, is submitted in qTest |
Copy
|
Test runs
Event | Notification | Sample payload |
---|---|---|
testrun_created | A new test run is created in qTest |
Copy
|
testrun_deleted | A test run is deleted in qTest |
Copy
|
testrun_updated | A test run is updated in qTest |
Copy
|
Requirements
Event | Notification | Sample payload |
---|---|---|
requirement_created | A new requirement is created in qTest |
Copy
|
requirement_deleted | A requirement is deleted in qTest |
Copy
|
requirement_updated | A requirement is updated in qTest |
Copy
|