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

Partner

Partner-facing integration endpoints

List API keys for the organization

GET
/api/v1/partner/api-keys

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/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)

POST
/api/v1/partner/api-keys

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)

Formatdate-time
name*string

Human-readable name for the key

Length1 <= length <= 100
partnerId*string

External partner identifier

Length1 <= length <= 100
scopes*array<>

Permission scopes

Items1 <= items

Response 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

DELETE
/api/v1/partner/api-keys/{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/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
}