Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Observability

Logs, metrics, traffic and runtime state of services and environments. Each operation lists its method and path, parameters, request body, responses and an example call.

GET/api/v1/clusters/{id}/project-usage

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Cluster id.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/clusters/string/project-usage"
{  "$schema": "https://example.com/ClusterProjectUsageOutputBody.json",  "projects": [    {      "cpuMilli": 0,      "memoryBytes": 0,      "projectId": "string"    }  ]}
GET/api/v1/environments/{id}/canvas-metrics

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Environment id.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/environments/string/canvas-metrics"
{  "$schema": "https://example.com/CanvasMetricsOutputBody.json",  "services": [    {      "cron": {        "lastScheduleTime": "2019-08-24T14:15:22Z",        "nextRunTime": "2019-08-24T14:15:22Z",        "processName": "string",        "runs": [          {            "finishedAt": "2019-08-24T14:15:22Z",            "startedAt": "2019-08-24T14:15:22Z",            "succeeded": true          }        ]      },      "instances": [        {          "ready": true,          "role": "writer"        }      ],      "kind": "string",      "limits": {        "cpuMilli": 0,        "memoryBytes": 0      },      "metrics": [        {          "headline": 0.1,          "key": "cpu",          "observed": 0,          "points": [            {              "t": "2019-08-24T14:15:22Z",              "v": 0.1            }          ],          "unreported": "tailnet-only",          "value": "string"        }      ],      "processName": "string",      "serviceId": "string"    }  ]}
GET/api/v1/environments/{id}/logs

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Environment id.

Query Parameters

cursor?string

Opaque cursor from a previous response's nextCursor. Omit for the first page.

limit?integer

How many items to return.

Formatint64
Range1 <= value <= 200
Default50
serviceId?string

Restrict to one service. Omit for the whole environment.

podName?string

Restrict to one pod. Omit for every pod.

q?string

Full-text search over log lines. Omit to match everything.

from?string

Inclusive lower time bound. Omit for the start of retention.

Formatdate-time
to?string

Exclusive upper time bound. Omit for now.

Formatdate-time
level?string

Only lines at this level or worse (warn includes error). Omit for every line, including lines with no detectable level.

Value in

  • "debug"
  • "info"
  • "warn"
  • "error"

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/environments/string/logs"
{  "$schema": "https://example.com/ListLogsOutputBody.json",  "items": [    {      "at": "2019-08-24T14:15:22Z",      "gap": true,      "gapReason": "string",      "level": "debug",      "podName": "string",      "processName": "string",      "serviceId": "string",      "text": "string"    }  ],  "nextCursor": "string"}
GET/api/v1/environments/{id}/logs/stream

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Environment id.

Query Parameters

serviceId?string

Restrict the tail to one service. Omit for the whole environment.

podName?string

Restrict the tail to one pod. Omit for every pod.

level?string

Only lines at this level or worse (warn includes error). Omit for every line, including lines with no detectable level.

Value in

  • "debug"
  • "info"
  • "warn"
  • "error"

Response Body

text/event-stream

application/problem+json

curl -X GET "https://example.com/api/v1/environments/string/logs/stream"
[  {    "data": {      "at": "2019-08-24T14:15:22Z",      "environmentId": "string",      "level": "debug",      "podName": "string",      "processName": "string",      "serviceId": "string",      "text": "string"    },    "event": "log",    "id": 0,    "retry": 0  }]
GET/api/v1/services/{id}/metrics

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Query Parameters

environmentId?string

Environment id.

window?string

Trailing window to report.

Value in

  • "1h"
  • "6h"
  • "24h"

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/services/string/metrics"
{  "$schema": "https://example.com/ServiceMetricsOutputBody.json",  "pods": [    {      "podName": "string",      "samples": [        {          "at": "2019-08-24T14:15:22Z",          "cpuMilli": 0,          "memoryBytes": 0        }      ]    }  ]}
GET/api/v1/services/{id}/metrics/summary

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Query Parameters

environmentId*string

Environment id.

window?string

Trailing window to report.

Default"1h"

Value in

  • "1h"
  • "24h"
  • "7d"

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/services/string/metrics/summary?environmentId=string"
{  "$schema": "https://example.com/MetricsSummaryOutputBody.json",  "bucketSeconds": 0,  "cpu": {    "limitMilli": 0,    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ],    "unit": "percent"  },  "errorRate": {    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ]  },  "memory": {    "limitBytes": 0,    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ],    "unit": "percent"  },  "p95Ms": {    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ]  },  "requestsPerMinute": {    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ]  },  "trafficReported": true,  "usageReported": true,  "window": "1h"}
GET/api/v1/services/{id}/runtime

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Query Parameters

environmentId?string

Environment id.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/services/string/runtime"
{  "$schema": "https://example.com/ServiceRuntimeOutputBody.json",  "clusterId": "string",  "events": [    {      "at": "2019-08-24T14:15:22Z",      "kind": "string"    }  ],  "observedAt": "2019-08-24T14:15:22Z",  "pods": [    {      "cpuMilli": 0,      "lastExitCode": 0,      "lastTerminationReason": "string",      "memoryBytes": 0,      "name": "string",      "node": "string",      "phase": "string",      "processName": "string",      "ready": true,      "restarts": 0,      "startedAt": "2019-08-24T14:15:22Z",      "waitingMessage": "string",      "waitingReason": "string"    }  ],  "resources": [    {      "name": "string",      "of": "string"    }  ]}
GET/api/v1/services/{id}/traffic

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Query Parameters

environmentId?string

Environment id.

window?string

Trailing window to report.

Value in

  • "1h"
  • "6h"
  • "24h"

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/services/string/traffic"
{  "$schema": "https://example.com/ServiceTrafficOutputBody.json",  "points": [    {      "at": "2019-08-24T14:15:22Z",      "errors5xx": 0,      "errors5xxShare": 0.1,      "latencyP95Milli": 0,      "requests": 0,      "requestsPerMinute": 0.1    }  ]}