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

Vcp

VCP REST integration endpoints

Get pending and recently applied commands (default lookback: 24h)

GET
/api/v1/vcp/sites/{siteId}/commands

Path Parameters

siteId*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/vcp/sites/string/commands"
{
  "commands": [
    {}
  ]
}
{
  "code": "VALIDATION_ERROR",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid path or query parameters (e.g. malformed UUID)",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Missing or invalid API key",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Insufficient API key scope",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Get current VCP site config (constraints, fallback, mode, active schedule)

GET
/api/v1/vcp/sites/{siteId}/config

Path Parameters

siteId*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/vcp/sites/string/config"
{
  "activeSchedule": {},
  "constraints": {},
  "fallback": {},
  "modeOverride": {},
  "operatingMode": "string",
  "pendingCommands": [
    {}
  ],
  "siteId": "string"
}
{
  "code": "VALIDATION_ERROR",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid path or query parameters (e.g. malformed UUID)",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Missing or invalid API key",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Insufficient API key scope",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Query meter readings (max 48h window)

GET
/api/v1/vcp/sites/{siteId}/telemetry/meter

Path Parameters

siteId*string

Query Parameters

from*string

ISO start of the meter-reading window. Max 48h before to.

Formatdate-time
to?string

ISO end of the meter-reading window. Defaults to now.

Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/vcp/sites/string/telemetry/meter?from=2019-08-24T14%3A15%3A22Z"
{
  "readings": [
    {}
  ]
}
{
  "code": "VALIDATION_ERROR",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid path or query parameters (e.g. malformed UUID)",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Missing or invalid API key",
  "statusCode": 400
}
{
  "code": "FORBIDDEN",
  "details": {},
  "error": "Forbidden",
  "message": "Insufficient API key scope",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}