Plants
Plant management
List all plants
Query Parameters
Page number (1-indexed)
11 <= valueItems per page
201 <= value <= 100Filter by authentication method
"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
Request Body
application/json
Authentication method (defaults to MTLS)
"MTLS""MTLS" | "TOKEN" | "PASSWORD"Additional metadata
Plant display name
1 <= length <= 100Unique serial number
1 <= length <= 50Plant type
"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
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
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"{
"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
Path Parameters
Request Body
application/json
Authentication method (defaults to MTLS)
"MTLS""MTLS" | "TOKEN" | "PASSWORD"External plant id linking this plant to an ESM (e.g. VELVARY-MAIN). Pass null to unlink.
length <= 120Additional metadata
Plant display name
1 <= length <= 100Reassign plant to a different organization (super-admin only)
uuidUnique serial number
1 <= length <= 50Device template ID for signal decoding (null to unassign)
uuidPlant type
"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
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"{
"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)
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/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
Path Parameters
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
Path Parameters
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
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/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
Path Parameters
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
Path Parameters
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)
Path Parameters
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)
Path Parameters
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
Path Parameters
Query Parameters
Page number (1-indexed)
11 <= valueItems per page
201 <= value <= 100Response 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
Path Parameters
Request Body
application/json
Command name
length <= 255Command payload
Optional sub-device target (externalId)
^[A-Z0-9_-]{1,32}$length <= 32Response 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
}