ReferenceREST API
Partner
Partner-facing integration endpoints
List API keys for the organization
Query Parameters
page?number
Page number (1-indexed)
Default
1Range
1 <= valuelimit?number
Items per page
Default
20Range
1 <= value <= 100Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/partner/api-keys"{
"data": [
{
"allowedIps": [
"203.0.113.5/32"
],
"createdAt": "2019-08-24T14:15:22Z",
"createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
"creator": {
"createdAt": "2019-08-24T14:15:22Z",
"email": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"role": "ADMIN",
"updatedAt": "2019-08-24T14:15:22Z"
},
"expiresAt": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"isActive": true,
"keyPrefix": "string",
"lastUsedAt": "2019-08-24T14:15:22Z",
"name": "string",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"partnerId": "string",
"scopes": [
"string"
],
"updatedAt": "2019-08-24T14:15:22Z",
"vhost": "string"
}
],
"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 API key (plaintext returned once)
Request Body
application/json
allowedIps?array<>
CIDR allowlist (e.g. ["10.20.30.0/24"]). Empty/omitted = no IP restriction. Validated server-side.
allowedPlantIds?array<>
Restrict key to specific plant UUIDs (null/omit = all plants in org)
expiresAt?string
Key expiration date (ISO 8601)
Format
date-timename*string
Human-readable name for the key
Length
1 <= length <= 100partnerId*string
External partner identifier
Length
1 <= length <= 100scopes*array<>
Permission scopes
Items
1 <= itemsResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/v1/partner/api-keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "partnerId": "string", "scopes": [ "plants:read", "telemetry:read" ] }'{
"apiKey": {
"allowedIps": [
"203.0.113.5/32"
],
"createdAt": "2019-08-24T14:15:22Z",
"createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
"creator": {
"createdAt": "2019-08-24T14:15:22Z",
"email": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"role": "ADMIN",
"updatedAt": "2019-08-24T14:15:22Z"
},
"expiresAt": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"isActive": true,
"keyPrefix": "string",
"lastUsedAt": "2019-08-24T14:15:22Z",
"name": "string",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"partnerId": "string",
"scopes": [
"string"
],
"updatedAt": "2019-08-24T14:15:22Z",
"vhost": "string"
},
"key": "string",
"signingKey": "string"
}{
"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
}Revoke an API key
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/partner/api-keys/string"{
"message": "string"
}{
"code": "INVALID_UUID",
"details": {},
"error": "Bad Request",
"message": "Invalid API key UUID",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "API_KEY_NOT_FOUND",
"details": {},
"error": "Not Found",
"message": "API key not found",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}