latestOpenAPI 3.0.02026-08-2217901.1 MB

ef9153fcac7c

Asset Statuses

Update asset status

patch/assetstatuses/{id}

Path parameters

idinteger required

ID of the asset status

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 edited asset status

Example response

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