latestOpenAPI 3.0.02026-08-2217901.1 MB

ef9153fcac7c

Assets

Create a new asset status

post/assets/{assetId}/status

Path parameters

assetIdinteger required

ID of the asset

Query parameters

skipWebhookboolean

Set skipWebhook=true, skipWebhook=1 or skipWebhook=yes to skip all webhooks upon successful operation on the endpoint. Learn more about webhooks

Headers

x-organization-idinteger

Required if using a multi organizations token

Request body

status'IGNORE' | 'OFFLINE' | 'ONLINE'

Asset status value.

customStatusIdnumber nullable

Id of the custom status assigned to asset.

downtimeType'PLANNED' | 'UNPLANNED' nullable
startedAtstring date-time

Asset status effective start date.

endedAtstring date-time nullable

Asset status effective end date.

descriptionstring nullable

Example request

{
  "status": "OFFLINE",
  "customStatusId": 53,
  "downtimeType": "PLANNED",
  "startedAt": "2022-01-01T12:34:56.123Z",
  "endedAt": "2022-01-01T12:34:56.123Z",
  "description": "Overheated - needs servicing."
}

Response

Successfully set a new asset status

Example response

{
  "assetStatus": {
    "id": 42,
    "downtimeType": "PLANNED",
    "status": "OFFLINE",
    "startedAt": "2022-01-01T12:34:56.123Z",
    "customStatusId": 53,
    "updatedAt": "2022-01-01T12:34:56.123Z"
  }
}