This is a development version of the documentation. Content may change without notice.
Voke Documentation
ReferenceREST API

Alerts

Alerts and alarms

List all alerts

GET
/api/v1/alerts

Query Parameters

page?number

Page number (1-indexed)

Default1
Range1 <= value
limit?number

Items per page

Default20
Range1 <= value <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/alerts"
{
  "data": [
    {
      "acknowledgedAt": "2019-08-24T14:15:22Z",
      "acknowledgedBy": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "id": "string",
      "message": "string",
      "plantId": "string",
      "resolvedAt": "2019-08-24T14:15:22Z",
      "severity": "INFO",
      "status": "ACTIVE",
      "type": "THRESHOLD_EXCEEDED",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "limit": 0,
    "page": 0,
    "total": 0,
    "totalPages": 0
  }
}
{
  "code": "VALIDATION_ERROR",
  "details": {},
  "error": "Bad Request",
  "message": "Validation error",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Get alert by ID

GET
/api/v1/alerts/{id}

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/alerts/string"
{
  "acknowledgedAt": "2019-08-24T14:15:22Z",
  "acknowledgedBy": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "message": "string",
  "plantId": "string",
  "resolvedAt": "2019-08-24T14:15:22Z",
  "severity": "INFO",
  "status": "ACTIVE",
  "type": "THRESHOLD_EXCEEDED",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "code": "INVALID_UUID",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid alert UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Alert not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Acknowledge an alert

PATCH
/api/v1/alerts/{id}/acknowledge

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://loading/api/v1/alerts/string/acknowledge"
{
  "acknowledgedAt": "2019-08-24T14:15:22Z",
  "acknowledgedBy": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "message": "string",
  "plantId": "string",
  "resolvedAt": "2019-08-24T14:15:22Z",
  "severity": "INFO",
  "status": "ACTIVE",
  "type": "THRESHOLD_EXCEEDED",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "code": "INVALID_UUID",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid alert UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Alert not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Resolve an alert

PATCH
/api/v1/alerts/{id}/resolve

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://loading/api/v1/alerts/string/resolve"
{
  "acknowledgedAt": "2019-08-24T14:15:22Z",
  "acknowledgedBy": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "message": "string",
  "plantId": "string",
  "resolvedAt": "2019-08-24T14:15:22Z",
  "severity": "INFO",
  "status": "ACTIVE",
  "type": "THRESHOLD_EXCEEDED",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "code": "INVALID_UUID",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid alert UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Alert not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}