Send a test notification

  1. Request
  2. Path parameters
  3. Headers
  4. Example of the notification body
  5. Response

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>

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 TEST_EVENT value indicating a test notification.

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 TEST_EVENT value indicating a test notification.

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.

True or False.

responseReceivedAt

string

The UTC date and time when the subscription was created, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

errorType

string

Error type.

Acceptable values:

  • WRONG_STATUS_CODE — Invalid status code.
  • TOO_MANY_CONNECTIONS — Connection limit exceeded.
  • REQUEST_TIMEOUT — Request timeout.
  • CONNECTION_ERROR — Connection error.
  • INTERNAL_ERROR — Internal error.
  • UNKNOWN — Unknown error.

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.

True or False.

responseReceivedAt

string

The UTC date and time when the subscription was created, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

errorType

string

Error type.

Acceptable values:

  • WRONG_STATUS_CODE — Invalid status code.
  • TOO_MANY_CONNECTIONS — Connection limit exceeded.
  • REQUEST_TIMEOUT — Request timeout.
  • CONNECTION_ERROR — Connection error.
  • INTERNAL_ERROR — Internal error.
  • UNKNOWN — Unknown error.

originalStatusCode

int

Status code of the response from the subscription URL.

uuids

array of strings

Array of unique event numbers.