Set label color
PATCH
/label/<labelId>/color
Description
Set the label color. Success (204) is also returned when the label color remains unchanged.
Path parameters
Param | Description |
---|---|
labelId |
Label Id. |
Query parameters
none
Body
Param | Type | Required | Description |
---|---|---|---|
color |
string | Yes | Label color. See table below for all available colors. |
Kind
Color | Name |
---|---|
⬤ | Steel (default) |
⬤ | Olive |
⬤ | Mauve |
⬤ | Emerald |
⬤ | Orange |
⬤ | Magenta |
⬤ | Cherry |
⬤ | Gold |
⬤ | InfraSonarBlue (reserved for global labels) |
Return codes
Error code | Reason |
---|---|
204 |
Success. |
400 |
Invalid body. |
401 |
Invalid or missing token. |
403 |
Insufficient permissions (required: API +CONTAINER_ADMIN ). |
404 |
Label not found. |
Example
Curl request:
curl \
-X PATCH 'https://api.infrasonar.com/label/123/color' \
-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
--data-raw '{
"color": "Orange"
}'