Send a test notification
Sends a test notification to the URL specified in the subscription.
Request
POST https://toloka.yandex.com/api/v1/webhook-subscriptions/<subscription_id>/test
Authorization: OAuth <OAuth token>
POST https://sandbox.toloka.yandex.com/api/v1/webhook-subscriptions/<subscription_id>/test
Authorization: OAuth <OAuth token>
Path parameters
Parameter | Overview |
---|---|
subscription_id | ID of the subscription. |
Parameter | Overview |
---|---|
subscription_id | ID of the subscription. |
Headers
Title | Overview |
---|---|
Authorization | A token for account authorization. Add OAuth as a prefix. |
Title | Overview |
---|---|
Authorization | A token for account authorization. Add OAuth as a prefix. |
Example of the notification body
{ "uuid": "uuid", "event_time": "2020-02-14T12:22:58", "project_id": "projectId", "pool_id": "poolId", "type": "TEST_EVENT" }
Copied to clipboard
Parameter | Overview |
---|---|
uuid | string | required Unique event number generated for each new request. |
event_time | string | required Time when the event occurs. |
project_id | string | mandatory ID of the project that the pool was created for. |
pool_id | string | required ID of the pool that the subscription was created for. |
type | string | required Notification type. Takes the |
Parameter | Overview |
---|---|
uuid | string | required Unique event number generated for each new request. |
event_time | string | required Time when the event occurs. |
project_id | string | mandatory ID of the project that the pool was created for. |
pool_id | string | required ID of the pool that the subscription was created for. |
type | string | required Notification type. Takes the |
Response
If the request is successful, the server returns the “200 Ok” or “404 Not Found” HTTP operation status.
{
"success": true,
"responseReceivedAt": "2020-02-14T12:22:58",
"errorType": "WRONG_STATUS_CODE",
"originalStatusCode": 1,
"uuids": ["uuid1", ..."uuid5"]
}
Parameter | Overview |
---|---|
success | boolean Request execution status.
|
responseReceivedAt | string The UTC date and time when the subscription was created, in ISO 8601 format: |
errorType | string Error type. Acceptable values:
|
originalStatusCode | int Status code of the response from the subscription URL. |
uuids | array of strings Array of unique event numbers. |
Parameter | Overview |
---|---|
success | boolean Request execution status.
|
responseReceivedAt | string The UTC date and time when the subscription was created, in ISO 8601 format: |
errorType | string Error type. Acceptable values:
|
originalStatusCode | int Status code of the response from the subscription URL. |
uuids | array of strings Array of unique event numbers. |