Adds company's Sensors Feature
Adds company's Sensors Feature.
Request
PUT
https://courier.yandex.ru/api/v1/companies/{company_id}/features/sensors
Path parameters
Name |
Description |
company_id* |
Type: integer The ID of the company. |
Body
application/json
{
"alerts": [
{
"type": "range",
"scope": "while_not_empty",
"threshold_time": 0,
"repeat": {
"period": 0
}
}
]
}
Name |
Description |
alerts |
Type: SensorAlert[] Created sensor alerts. |
SensorAlert
Name |
Description |
threshold_time* |
Type: integer Threshold time during which the sensor can exceed the threshold value (in seconds, default is taken from the company settings). Min value: Max value: |
type* |
Type: string Type of the sensor-alert. Enum: |
repeat |
Type: SensorAlert_repeat |
scope |
Type: string Alert's scope. Default: Enum: |
SensorAlert_repeat
Name |
Description |
period* |
Type: integer Alert repetition period in seconds. Min value: Max value: |
Responses
200 OK
Success.
Body
application/json
{
"alerts": [
{
"type": "range",
"scope": "while_not_empty",
"threshold_time": 0,
"repeat": {
"period": 0
}
}
]
}
Name |
Description |
alerts |
Type: SensorAlert[] Created sensor alerts. |
400 Bad Request
Invalid parameters were passed.
401 Unauthorized
Authorization failed. Send the correct OAuth token in the authorization header.
403 Forbidden
Sensors feature is not available for the company.
422 Unprocessable Entity
Incorrect input.
504 Gateway Timeout
Server error during request processing.
No longer supported, please use an alternative and newer version.