EBXv1

API reference

Integrations

Machine to machine integrations in your organisation and their secrets. Up to two secrets can be active per integration, so they can be rotated without downtime.

6 endpoints
GET/v1/integrations

List Integrations

clients.read

List M2M integrations visible to the caller.

ebx admins get all integrations across all organisations; other users are scoped to their own organisation(s).

This endpoint takes no parameters.

Example value
curl "https://api.ebx.energy/v1/integrations" \
  -H "Authorization: Bearer $EBX_TOKEN"
Example response200
[
  {
    "integration_id": "<string>",
    "name": "<string>",
    "organization_id": "<string>",
    "created_at": "<string>"
  }
]
Can raise
  • 401no valid token
  • 403scope missing
  • 429rate limited
ALL CODES →
POST/v1/integrations

Create Integration

clients.write

Create a Cognito app client for M2M integration access.

The integration name must be unique within your organization. The internal Cognito client will be named with a format that prevents collisions.

Request body · required

nameREQUIRED
stringUser-facing display name for the integration (must be unique within your organization)
scopesREQUIRED
array[enum]OAuth scopes to grant this integration. Available scopes for M2M integrations: "asset.read", "asset.write", "alarm.read", "alarm.write", "market.read", "market.write", "report.read", "users.read", "users.write", "clients.read", "clients.write". You can only grant scopes you possess. Internal scopes (pool, dispatch, tso) are not grantable.
Example value
curl -X POST "https://api.ebx.energy/v1/integrations" \
  -H "Authorization: Bearer $EBX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>","scopes":["asset.read"]}'
Example response201
{
  "integration_id": "<string>",
  "client_secret": "<string>",
  "name": "<string>",
  "organization_id": "<string>",
  "scopes": [
    "<string>"
  ]
}
Can raise
  • 400malformed request
  • 401no valid token
  • 403scope missing
  • 409state conflict
  • 422validation failed
  • 429rate limited
ALL CODES →
DELETE/v1/integrations/{integration_id}

Delete Integration

clients.write

Delete an M2M integration.

Path parameters

integration_idREQUIRED
string
Example value
curl -X DELETE "https://api.ebx.energy/v1/integrations/scada-primary" \
  -H "Authorization: Bearer $EBX_TOKEN"

Returns 204 with no body.

Can raise
  • 400malformed request
  • 401no valid token
  • 403scope missing
  • 404unknown or not visible
  • 409state conflict
  • 429rate limited
ALL CODES →
GET/v1/integrations/{integration_id}/secrets

List Secrets

clients.read

List secret descriptors for an M2M integration (values are never returned).

Path parameters

integration_idREQUIRED
string
Example value
curl "https://api.ebx.energy/v1/integrations/scada-primary/secrets" \
  -H "Authorization: Bearer $EBX_TOKEN"
Example response200
[
  {
    "secret_id": "<string>",
    "creation_date": "<string>"
  }
]
Can raise
  • 401no valid token
  • 403scope missing
  • 404unknown or not visible
  • 429rate limited
ALL CODES →
POST/v1/integrations/{integration_id}/secrets

Add Secret

clients.write

Add a new secret to an M2M integration.

Cognito supports up to two active secrets per integration. To complete a rotation: add a new secret, migrate consumers, then delete the old one.

Path parameters

integration_idREQUIRED
string
Example value
curl -X POST "https://api.ebx.energy/v1/integrations/scada-primary/secrets" \
  -H "Authorization: Bearer $EBX_TOKEN"
Example response201
{
  "integration_id": "<string>",
  "secret_id": "<string>",
  "secret_value": "<string>"
}
Can raise
  • 400malformed request
  • 401no valid token
  • 403scope missing
  • 404unknown or not visible
  • 409state conflict
  • 429rate limited
ALL CODES →
DELETE/v1/integrations/{integration_id}/secrets/{secret_id}

Delete Secret

clients.write

Delete a specific secret from an M2M integration.

Path parameters

integration_idREQUIRED
string
secret_idREQUIRED
string
Example value
curl -X DELETE "https://api.ebx.energy/v1/integrations/scada-primary/secrets/scada-primary-basic-auth" \
  -H "Authorization: Bearer $EBX_TOKEN"

Returns 204 with no body.

Can raise
  • 400malformed request
  • 401no valid token
  • 403scope missing
  • 404unknown or not visible
  • 409state conflict
  • 429rate limited
ALL CODES →

Send feedback

This goes straight to the docs team on Slack, with the page you are on. It is not attributed to you, so say who you are if you would like an answer.

0/2000