Sub Devices
Plant-scoped physical components and decoded telemetry
List sub-devices for a plant
Path Parameters
Query Parameters
Page number (1-indexed)
11 <= valueItems per page
201 <= value <= 100"CABINET" | "METER" | "INVERTER" | "BATTERY""ONLINE" | "OFFLINE" | "DEGRADED" | "UNKNOWN"Search externalId, name or serial number
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/plants/string/sub-devices"{
"data": [
{
"createdAt": "2019-08-24T14:15:22Z",
"externalId": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"lastSeenAt": "2019-08-24T14:15:22Z",
"metadata": {},
"name": "string",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"plantId": "bb17678d-82fa-43da-92e5-df833ebe5344",
"serialNumber": "string",
"status": "ONLINE",
"templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
"type": "CABINET",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"meta": {
"limit": 0,
"page": 0,
"total": 0,
"totalPages": 0
}
}{
"code": "VALIDATION_ERROR",
"details": {},
"error": "Bad Request",
"message": "Invalid UUID or query parameters",
"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
}Create a sub-device under a plant
Path Parameters
Request Body
application/json
Short, URL-safe, unique-per-plant identifier (e.g. "R1", "E2", "M1")
EXTERNAL_ID_REGEXOperator-assigned display name
length <= 255Physical hardware serial (audit only)
length <= 64Device template to decode payloads with
uuid"CABINET" | "METER" | "INVERTER" | "BATTERY"Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/v1/plants/string/sub-devices" \ -H "Content-Type: application/json" \ -d '{ "externalId": "R1", "name": "string", "type": "CABINET" }'{
"createdAt": "2019-08-24T14:15:22Z",
"externalId": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"lastSeenAt": "2019-08-24T14:15:22Z",
"metadata": {},
"name": "string",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"plantId": "bb17678d-82fa-43da-92e5-df833ebe5344",
"serialNumber": "string",
"status": "ONLINE",
"templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
"type": "CABINET",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"code": "VALIDATION_ERROR",
"details": {},
"error": "Bad Request",
"message": "Invalid payload or externalId format",
"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 template not found",
"statusCode": 400
}{
"code": "SUB_DEVICE_EXTERNAL_ID_TAKEN",
"details": {},
"error": "Conflict",
"message": "externalId already taken within this plant",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Get a single sub-device by its externalId
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/plants/string/sub-devices/string"{
"createdAt": "2019-08-24T14:15:22Z",
"externalId": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"lastSeenAt": "2019-08-24T14:15:22Z",
"metadata": {},
"name": "string",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"plantId": "bb17678d-82fa-43da-92e5-df833ebe5344",
"serialNumber": "string",
"status": "ONLINE",
"templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
"type": "CABINET",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"code": "INVALID_UUID",
"details": {},
"error": "Bad Request",
"message": "Invalid UUID",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "SUB_DEVICE_NOT_FOUND",
"details": {},
"error": "Not Found",
"message": "Sub-device or plant not found",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Update a sub-device
Path Parameters
Request Body
application/json
length <= 255length <= 64uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://loading/api/v1/plants/string/sub-devices/string" \ -H "Content-Type: application/json" \ -d '{}'{
"createdAt": "2019-08-24T14:15:22Z",
"externalId": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"lastSeenAt": "2019-08-24T14:15:22Z",
"metadata": {},
"name": "string",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"plantId": "bb17678d-82fa-43da-92e5-df833ebe5344",
"serialNumber": "string",
"status": "ONLINE",
"templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
"type": "CABINET",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"code": "VALIDATION_ERROR",
"details": {},
"error": "Bad Request",
"message": "Invalid payload",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "SUB_DEVICE_NOT_FOUND",
"details": {},
"error": "Not Found",
"message": "Sub-device not found",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Delete a sub-device
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://loading/api/v1/plants/string/sub-devices/string"{
"message": "string"
}{
"code": "INVALID_UUID",
"details": {},
"error": "Bad Request",
"message": "Invalid UUID",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "SUB_DEVICE_NOT_FOUND",
"details": {},
"error": "Not Found",
"message": "Sub-device not found",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Send a command to a sub-device via its parent plant
Path Parameters
Request Body
application/json
Action key (must match one declared in the device template)
length <= 64Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/v1/plants/string/sub-devices/string/commands" \ -H "Content-Type: application/json" \ -d '{ "action": "string" }'{
"message": "string"
}{
"code": "COMMAND_ACTION_NOT_IN_TEMPLATE",
"details": {},
"error": "Bad Request",
"message": "Action not in template or invalid params",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "SUB_DEVICE_NOT_FOUND",
"details": {},
"error": "Not Found",
"message": "Sub-device or plant not found",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Snapshot of the latest decoded signal values
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/plants/string/sub-devices/string/signals/latest"{
"metric": "string",
"time": "2019-08-24T14:15:22Z",
"unit": "string",
"value": 0
}{
"code": "INVALID_UUID",
"details": {},
"error": "Bad Request",
"message": "Invalid UUID",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "SUB_DEVICE_NOT_FOUND",
"details": {},
"error": "Not Found",
"message": "Sub-device not found",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Historical telemetry for a sub-device (auto-selects CAGG)
Path Parameters
Query Parameters
ISO start timestamp
date-timeISO end timestamp
date-timeFilter by metric key (signal key)
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/plants/string/sub-devices/string/telemetry?from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z"{
"avgValue": 0,
"bucket": "2019-08-24T14:15:22Z",
"count": 0,
"maxValue": 0,
"metric": "string",
"minValue": 0
}{
"code": "VALIDATION_ERROR",
"details": {},
"error": "Bad Request",
"message": "Invalid time range",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "SUB_DEVICE_NOT_FOUND",
"details": {},
"error": "Not Found",
"message": "Sub-device not found",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}