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

Plants

Plant management

List all plants

GET
/api/v1/plants

Query Parameters

page?number

Page number (1-indexed)

Default1
Range1 <= value
limit?number

Items per page

Default20
Range1 <= value <= 100
authMethod?string

Filter by authentication method

Value in"MTLS" | "TOKEN" | "PASSWORD"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/plants"
{
  "data": [
    {
      "activatedAt": "2019-08-24T14:15:22Z",
      "authFailureCount": 0,
      "authMethod": "MTLS",
      "certificateExpiresAt": "2019-08-24T14:15:22Z",
      "certificateFingerprint": "string",
      "certificateSerialNumber": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "id": "string",
      "lastAuthFailureAt": "2019-08-24T14:15:22Z",
      "lastSeenAt": "2019-08-24T14:15:22Z",
      "lifecycleStatus": "PENDING",
      "metadata": {},
      "name": "string",
      "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
      "secretRotatedAt": "2019-08-24T14:15:22Z",
      "serialNumber": "string",
      "status": "ONLINE",
      "template": {
        "actions": [
          {}
        ],
        "createdAt": "2019-08-24T14:15:22Z",
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "isSystem": true,
        "level": "PLANT",
        "name": "string",
        "signals": [
          {}
        ],
        "type": "CABINET",
        "updatedAt": "2019-08-24T14:15:22Z",
        "version": 0
      },
      "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
      "type": "SENSOR",
      "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
}

Create a new plant

POST
/api/v1/plants

Request Body

application/json

authMethod?string

Authentication method (defaults to MTLS)

Default"MTLS"
Value in"MTLS" | "TOKEN" | "PASSWORD"
metadata?|

Additional metadata

name*string

Plant display name

Length1 <= length <= 100
serialNumber*string

Unique serial number

Length1 <= length <= 50
type*string

Plant type

Value in"SENSOR" | "ACTUATOR" | "GATEWAY" | "CONTROLLER"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/plants" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "serialNumber": "string",    "type": "SENSOR"  }'
{
  "activatedAt": "2019-08-24T14:15:22Z",
  "authFailureCount": 0,
  "authMethod": "MTLS",
  "certificateExpiresAt": "2019-08-24T14:15:22Z",
  "certificateFingerprint": "string",
  "certificateSerialNumber": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "lastAuthFailureAt": "2019-08-24T14:15:22Z",
  "lastSeenAt": "2019-08-24T14:15:22Z",
  "lifecycleStatus": "PENDING",
  "metadata": {},
  "name": "string",
  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  "secretRotatedAt": "2019-08-24T14:15:22Z",
  "serialNumber": "string",
  "status": "ONLINE",
  "template": {
    "actions": [
      {}
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "isSystem": true,
    "level": "PLANT",
    "name": "string",
    "signals": [
      {}
    ],
    "type": "CABINET",
    "updatedAt": "2019-08-24T14:15:22Z",
    "version": 0
  },
  "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
  "type": "SENSOR",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "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": "PLANT_ALREADY_EXISTS",
  "details": {},
  "error": "Conflict",
  "message": "Plant with this serial number already exists",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Get mTLS certificate health statistics

GET
/api/v1/plants/certificate-stats

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/plants/certificate-stats"
{
  "active": 0,
  "atRiskPlants": [
    {
      "authMethod": "MTLS",
      "certificateExpiresAt": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "lifecycleStatus": "PENDING",
      "name": "string",
      "serialNumber": "string"
    }
  ],
  "expired": 0,
  "expiringSoon": 0,
  "nextRenewalAt": "2019-08-24T14:15:22Z",
  "revoked": 0
}
{
  "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 plant by ID

GET
/api/v1/plants/{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/plants/string"
{
  "activatedAt": "2019-08-24T14:15:22Z",
  "alerts": [
    {
      "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"
    }
  ],
  "authFailureCount": 0,
  "authMethod": "MTLS",
  "capacityKwh": 0,
  "certificateExpiresAt": "2019-08-24T14:15:22Z",
  "certificateFingerprint": "string",
  "certificateSerialNumber": "string",
  "configEnabled": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "description": "string",
  "esiState": "PLC_READY",
  "externalPlantId": "string",
  "fvePeakPowerKwp": 0,
  "id": "string",
  "lastAuthFailureAt": "2019-08-24T14:15:22Z",
  "lastSeenAt": "2019-08-24T14:15:22Z",
  "latitude": 0,
  "lifecycleStatus": "PENDING",
  "longitude": 0,
  "metadata": {},
  "name": "string",
  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  "plantGroups": [
    {
      "createdAt": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "plantWithLoad": true,
  "secretRotatedAt": "2019-08-24T14:15:22Z",
  "serialNumber": "string",
  "status": "ONLINE",
  "tag": "string",
  "template": {
    "actions": [
      {}
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "isSystem": true,
    "level": "PLANT",
    "name": "string",
    "signals": [
      {}
    ],
    "type": "CABINET",
    "updatedAt": "2019-08-24T14:15:22Z",
    "version": 0
  },
  "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
  "type": "SENSOR",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "code": "INVALID_UUID",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid plant UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Update a plant

PATCH
/api/v1/plants/{id}

Path Parameters

id*string

Request Body

application/json

authMethod?string

Authentication method (defaults to MTLS)

Default"MTLS"
Value in"MTLS" | "TOKEN" | "PASSWORD"
externalPlantId?|

External plant id linking this plant to an ESM (e.g. VELVARY-MAIN). Pass null to unlink.

Lengthlength <= 120
metadata?|

Additional metadata

name?string

Plant display name

Length1 <= length <= 100
organizationId?string

Reassign plant to a different organization (super-admin only)

Formatuuid
serialNumber?string

Unique serial number

Length1 <= length <= 50
templateId?|

Device template ID for signal decoding (null to unassign)

Formatuuid
type?string

Plant type

Value in"SENSOR" | "ACTUATOR" | "GATEWAY" | "CONTROLLER"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://loading/api/v1/plants/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "activatedAt": "2019-08-24T14:15:22Z",
  "authFailureCount": 0,
  "authMethod": "MTLS",
  "certificateExpiresAt": "2019-08-24T14:15:22Z",
  "certificateFingerprint": "string",
  "certificateSerialNumber": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "lastAuthFailureAt": "2019-08-24T14:15:22Z",
  "lastSeenAt": "2019-08-24T14:15:22Z",
  "lifecycleStatus": "PENDING",
  "metadata": {},
  "name": "string",
  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  "secretRotatedAt": "2019-08-24T14:15:22Z",
  "serialNumber": "string",
  "status": "ONLINE",
  "template": {
    "actions": [
      {}
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "isSystem": true,
    "level": "PLANT",
    "name": "string",
    "signals": [
      {}
    ],
    "type": "CABINET",
    "updatedAt": "2019-08-24T14:15:22Z",
    "version": 0
  },
  "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
  "type": "SENSOR",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Validation error, invalid UUID, or wrong-level template",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant or referenced template not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Delete a plant

DELETE
/api/v1/plants/{id}

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/api/v1/plants/string"
{
  "message": "string"
}
{
  "code": "INVALID_UUID",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid plant UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Energy summary for the plant for today (UTC)

GET
/api/v1/plants/{id}/energy/today

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/plants/string/energy/today"
{
  "date": "string",
  "exported": 0,
  "imported": 0,
  "produced": 0,
  "selfConsumptionPct": 0
}
{
  "code": "INVALID_UUID",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid plant UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Issue a new MQTT JWT for a TOKEN-auth plant

POST
/api/v1/plants/{id}/mqtt-token

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/plants/string/mqtt-token"
{
  "expiresAt": "2019-08-24T14:15:22Z",
  "token": "string"
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid UUID or plant is not eligible for MQTT token issuance",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Generate provisioning package for a plant

POST
/api/v1/plants/{id}/provision

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/plants/string/provision"
{
  "authMethod": "MTLS",
  "mqtt": {
    "broker": "string",
    "port": 0,
    "topics": {
      "ack": "string",
      "commands": "string",
      "status": "string",
      "telemetry": "string"
    }
  },
  "plantId": "bb17678d-82fa-43da-92e5-df833ebe5344",
  "protocol": {},
  "security": {
    "caCert": "string",
    "clientCert": "string",
    "clientKey": "string",
    "hmacSecret": "string"
  }
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid UUID or plant cannot be provisioned in its current state",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Download provisioning package as JSON file

GET
/api/v1/plants/{id}/provision/download

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/plants/string/provision/download"
{
  "authMethod": "MTLS",
  "mqtt": {
    "broker": "string",
    "port": 0,
    "topics": {
      "ack": "string",
      "commands": "string",
      "status": "string",
      "telemetry": "string"
    }
  },
  "plantId": "bb17678d-82fa-43da-92e5-df833ebe5344",
  "protocol": {},
  "security": {
    "caCert": "string",
    "clientCert": "string",
    "clientKey": "string",
    "hmacSecret": "string"
  }
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid UUID or plant cannot be provisioned in its current state",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Reactivate a suspended plant

POST
/api/v1/plants/{id}/reactivate

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/plants/string/reactivate"
{
  "message": "string"
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid UUID or plant cannot be reactivated in its current state",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Revoke plant certificate and HMAC secret

POST
/api/v1/plants/{id}/revoke

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/plants/string/revoke"
{
  "message": "string"
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid UUID or plant is already decommissioned",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Rotate plant HMAC secret (1h grace period for both old and new)

POST
/api/v1/plants/{id}/rotate-secret

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/plants/string/rotate-secret"
{
  "gracePeriodMinutes": 0,
  "hmacSecret": "string"
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid UUID or plant cannot rotate secret in its current state",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Suspend a plant (temporary disable)

POST
/api/v1/plants/{id}/suspend

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/plants/string/suspend"
{
  "message": "string"
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid UUID or plant cannot be suspended in its current state",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

List command history for a plant

GET
/api/v1/plants/{plantId}/commands

Path Parameters

plantId*string

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

application/json

curl -X GET "https://loading/api/v1/plants/string/commands"
{
  "data": [
    {
      "ackedAt": "2019-08-24T14:15:22Z",
      "cmdId": "string",
      "command": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "id": "string",
      "payload": {},
      "plantId": "string",
      "response": {},
      "responseStatus": "string",
      "sentAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "limit": 0,
    "page": 0,
    "total": 0,
    "totalPages": 0
  }
}
{
  "code": "INVALID_UUID",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid plant UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Send a command to a plant via MQTT

POST
/api/v1/plants/{plantId}/commands

Path Parameters

plantId*string

Request Body

application/json

command*string

Command name

Lengthlength <= 255
payload?object

Command payload

target?string

Optional sub-device target (externalId)

Match^[A-Z0-9_-]{1,32}$
Lengthlength <= 32

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/plants/string/commands" \  -H "Content-Type: application/json" \  -d '{    "command": "reboot"  }'
{
  "ackedAt": "2019-08-24T14:15:22Z",
  "cmdId": "string",
  "command": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "payload": {},
  "plantId": "string",
  "response": {},
  "responseStatus": "string",
  "sentAt": "2019-08-24T14:15:22Z"
}
{
  "code": "BAD_REQUEST",
  "details": {},
  "error": "Bad Request",
  "message": "Validation error or invalid plant UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Forbidden",
  "statusCode": 400
}
{
  "code": "PLANT_NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "Plant not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}