Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Agent

The endpoints a cluster's agent and the install scripts call. They authenticate with agent and enrollment tokens, not with API tokens. Each operation lists its method and path, parameters, request body, responses and an example call.

GET/agent/v1/access-state

Header Parameters

Authorization?string

Bearer RBAC broker token.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/agent/v1/access-state"
{  "$schema": "https://example.com/AccessState.json",  "buildRegistry": true,  "desiredAgentImage": "string",  "environments": [    {      "id": "string",      "namespace": "string",      "podSecurityBaseline": true    }  ],  "revision": 0}
GET/agent/v1/broker-commands

Header Parameters

Authorization?string

Bearer broker token. The normal agent token is not accepted.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/agent/v1/broker-commands"
{  "$schema": "https://example.com/BrokerCommands.json",  "commands": [    {      "expiresAt": "2019-08-24T14:15:22Z",      "id": "string",      "kind": "string",      "node": "string"    }  ]}
POST/agent/v1/broker-events

Header Parameters

Authorization?string

Bearer broker token. The normal agent token is not accepted.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

curl -X POST "https://example.com/agent/v1/broker-events" \  -H "Content-Type: application/json" \  -d '{    "id": "string"  }'
Empty
POST/agent/v1/build-logs

Header Parameters

Authorization?string

Bearer agent token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

curl -X POST "https://example.com/agent/v1/build-logs" \  -H "Content-Type: application/json" \  -d '{    "buildId": "string",    "lines": [      {        "at": "2019-08-24T14:15:22Z",        "text": "string"      }    ]  }'
Empty
POST/agent/v1/cnpg.sh

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/agent/v1/cnpg.sh" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
"string"
POST/agent/v1/enable-ha.sh

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/agent/v1/enable-ha.sh" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
"string"
POST/agent/v1/enroll

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/agent/v1/enroll" \  -H "Content-Type: application/json" \  -d '{    "enrollmentToken": "string",    "hello": {      "agentVersion": "string",      "capabilities": {        "metricsServer": true,        "tailscale": true,        "traefik": true      },      "k3sVersion": "string",      "nodes": [        {          "allocatable": {            "cpuMilli": 0,            "ephemeralBytes": 0,            "memoryBytes": 0,            "pods": 0          },          "allocated": {            "cpuMilli": 0,            "ephemeralBytes": 0,            "memoryBytes": 0,            "pods": 0          },          "k3sVersion": "string",          "name": "string",          "ready": true,          "unschedulable": true        }      ]    }  }'
{  "$schema": "https://example.com/EnrollResponse.json",  "agentToken": "string",  "clusterId": "string"}
POST/agent/v1/events

Header Parameters

Authorization?string

Bearer agent token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

[index: integer]?

Response Body

application/problem+json

curl -X POST "https://example.com/agent/v1/events" \  -H "Content-Type: application/json" \  -d '[    {      "at": "2019-08-24T14:15:22Z",      "kind": "string"    }  ]'
Empty
POST/agent/v1/heartbeat

Header Parameters

Authorization?string

Bearer agent token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

curl -X POST "https://example.com/agent/v1/heartbeat" \  -H "Content-Type: application/json" \  -d '{    "appliedRevision": 0,    "at": "2019-08-24T14:15:22Z",    "capabilities": {      "metricsServer": true,      "tailscale": true,      "traefik": true    },    "nodes": [      {        "allocatable": {          "cpuMilli": 0,          "ephemeralBytes": 0,          "memoryBytes": 0,          "pods": 0        },        "allocated": {          "cpuMilli": 0,          "ephemeralBytes": 0,          "memoryBytes": 0,          "pods": 0        },        "k3sVersion": "string",        "name": "string",        "ready": true,        "unschedulable": true      }    ],    "workloads": [      {        "environmentId": "string",        "pods": [          {            "cpuMilli": 0,            "memoryBytes": 0,            "name": "string",            "node": "string",            "phase": "string",            "ready": true,            "restarts": 0          }        ],        "releaseId": "string",        "serviceId": "string"      }    ]  }'
Empty
POST/agent/v1/hello

Header Parameters

Authorization?string

Bearer agent token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

curl -X POST "https://example.com/agent/v1/hello" \  -H "Content-Type: application/json" \  -d '{    "agentVersion": "string",    "capabilities": {      "metricsServer": true,      "tailscale": true,      "traefik": true    },    "k3sVersion": "string",    "nodes": [      {        "allocatable": {          "cpuMilli": 0,          "ephemeralBytes": 0,          "memoryBytes": 0,          "pods": 0        },        "allocated": {          "cpuMilli": 0,          "ephemeralBytes": 0,          "memoryBytes": 0,          "pods": 0        },        "k3sVersion": "string",        "name": "string",        "ready": true,        "unschedulable": true      }    ]  }'
Empty
POST/agent/v1/install.sh

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/agent/v1/install.sh" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
"string"
POST/agent/v1/install/join-config

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/agent/v1/install/join-config" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{  "$schema": "https://example.com/JoinConfigBody.json",  "k3sVersion": "string",  "serverUrl": "string",  "token": "string"}
POST/agent/v1/install/manifest

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/agent/v1/install/manifest" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
"string"
POST/agent/v1/install/progress

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

curl -X POST "https://example.com/agent/v1/install/progress" \  -H "Content-Type: application/json" \  -d '{    "nodeName": "string",    "status": "running",    "step": "preflight",    "token": "string"  }'
Empty
POST/agent/v1/logs

Header Parameters

Authorization?string

Bearer agent token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

curl -X POST "https://example.com/agent/v1/logs" \  -H "Content-Type: application/json" \  -d '{    "lines": [      {        "at": "2019-08-24T14:15:22Z",        "environmentId": "string",        "podName": "string",        "processName": "string",        "serviceId": "string",        "text": "string"      }    ]  }'
Empty
GET/agent/v1/ping

Header Parameters

Authorization?string

Bearer agent token.

Response Body

application/problem+json

curl -X GET "https://example.com/agent/v1/ping"
Empty
GET/agent/v1/stream

Header Parameters

Authorization?string

Bearer agent token.

Response Body

text/event-stream

application/problem+json

curl -X GET "https://example.com/agent/v1/stream"
[  {    "data": {      "$schema": "https://example.com/Command.json",      "buildId": "string",      "database": {        "maxRows": 0,        "query": "string",        "target": {          "database": "string",          "engine": "string",          "image": "string",          "namespace": "string",          "password": "string",          "port": 0,          "runAsUser": 0,          "serviceSlug": "string",          "username": "string"        },        "timeoutMillis": 0      },      "environmentId": "string",      "id": "string",      "image": "string",      "kind": "string",      "node": "string",      "pod": "string",      "process": "string",      "releaseId": "string",      "role": "string",      "serviceId": "string",      "volume": {        "database": {          "database": "string",          "engine": "string",          "image": "string",          "namespace": "string",          "password": "string",          "port": 0,          "runAsUser": 0,          "serviceSlug": "string",          "username": "string"        },        "environmentId": "string",        "expectedSha256": "string",        "jobId": "string",        "method": "string",        "namespace": "string",        "objectKey": "string",        "quiesce": true,        "serviceId": "string",        "serviceSlug": "string",        "store": {          "accessKeyId": "string",          "bucket": "string",          "endpoint": "string",          "forcePathStyle": true,          "region": "string",          "secretAccessKey": "string"        },        "volume": {          "mountPath": "string",          "name": "string",          "sizeBytes": 0,          "storageClass": "string"        }      }    },    "event": "command",    "id": 0,    "retry": 0  }]
POST/agent/v1/tailscale.sh

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/agent/v1/tailscale.sh" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
"string"