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.

POST/api/v1/alerts/{id}/acknowledge

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

Alert id.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/alerts/string/acknowledge"
{  "$schema": "https://example.com/AcknowledgeOutputBody.json",  "acknowledged": true}
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}/alerts

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

state?string

active lists open and acknowledged alerts; resolved lists those that resolved in the last seven days.

Default"active"

Value in

  • "active"
  • "resolved"

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/environments/string/alerts"
{  "$schema": "https://example.com/ListAlertsOutputBody.json",  "items": [    {      "acknowledgedAt": "2019-08-24T14:15:22Z",      "acknowledgedBy": "string",      "detail": "string",      "environmentId": "string",      "id": "string",      "lastEvaluatedAt": "2019-08-24T14:15:22Z",      "openedAt": "2019-08-24T14:15:22Z",      "resolvedAt": "2019-08-24T14:15:22Z",      "resolvedReason": "recovered",      "rule": "volume_usage",      "serviceId": "string",      "serviceName": "string",      "severity": "warning",      "state": "open",      "subject": "string",      "summary": "string",      "threshold": 0,      "unit": "percent",      "value": 0.1    }  ]}
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

Log query: words (all must appear), "exact phrase", -word to exclude, OR between terms, parentheses, level:error|warn|info|debug (exactly that level), service:, pod:, env: (environment-wide search only) and, for JSON lines, @field:value, @field:>=N, @field:N..M on dotted keys such as @http.status:>=500. Plain text is a case-insensitive substring. 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",  "highlight": [    "string"  ],  "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"
q?string

Only lines that satisfy this log query, in the syntax the search endpoint documents. A query the server cannot parse ends the stream with a refusal comment. Omit to tail everything.

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/environments/{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

Environment id.

Query Parameters

window?string

Trailing window to report. Defaults to 30m.

Value in

  • "15m"
  • "30m"
  • "1h"

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/environments/string/traffic"
{  "$schema": "https://example.com/EnvironmentTrafficOutputBody.json",  "databases": [    {      "engine": "postgres",      "otherConnections": 0,      "sampledAt": "2019-08-24T14:15:22Z",      "serviceId": "string",      "unreported": "engine-not-sampled"    }  ],  "edges": [    {      "connections": 0,      "from": "string",      "peak": 0,      "sampledAt": "2019-08-24T14:15:22Z",      "to": "string"    }  ],  "services": [    {      "errorRate": 0.1,      "p95Milli": 0.1,      "rpm": 0.1,      "serviceId": "string",      "unreported": {        "errorRate": "not-http",        "p95": "not-http",        "rpm": "not-http"      }    }  ],  "window": "15m"}
GET/api/v1/services/{id}/alert-rules

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 whose last measurements to report.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/services/string/alert-rules?environmentId=string"
{  "$schema": "https://example.com/ListRulesOutputBody.json",  "rules": [    {      "customized": true,      "defaultEnabled": true,      "defaultThreshold": 0,      "enabled": true,      "kind": "volume_usage",      "maxThreshold": 0,      "minThreshold": 0,      "status": {        "evaluated": true,        "evaluatedAt": "2019-08-24T14:15:22Z",        "reason": "string",        "value": 0      },      "threshold": 0,      "title": "string",      "unit": "percent",      "windowSeconds": 0    }  ]}
DELETE/api/v1/services/{id}/alert-rules/{kind}

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.

kind*string

Rule.

Value in

  • "volume_usage"
  • "memory_usage"
  • "restart_loop"
  • "cpu_usage"

Response Body

application/json

application/problem+json

curl -X DELETE "https://example.com/api/v1/services/string/alert-rules/volume_usage"
{  "$schema": "https://example.com/RuleResultOutputBody.json",  "rules": [    {      "customized": true,      "defaultEnabled": true,      "defaultThreshold": 0,      "enabled": true,      "kind": "volume_usage",      "maxThreshold": 0,      "minThreshold": 0,      "status": {        "evaluated": true,        "evaluatedAt": "2019-08-24T14:15:22Z",        "reason": "string",        "value": 0      },      "threshold": 0,      "title": "string",      "unit": "percent",      "windowSeconds": 0    }  ]}
PUT/api/v1/services/{id}/alert-rules/{kind}

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.

kind*string

Rule.

Value in

  • "volume_usage"
  • "memory_usage"
  • "restart_loop"
  • "cpu_usage"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PUT "https://example.com/api/v1/services/string/alert-rules/volume_usage" \  -H "Content-Type: application/json" \  -d '{    "enabled": true,    "threshold": 0  }'
{  "$schema": "https://example.com/RuleResultOutputBody.json",  "rules": [    {      "customized": true,      "defaultEnabled": true,      "defaultThreshold": 0,      "enabled": true,      "kind": "volume_usage",      "maxThreshold": 0,      "minThreshold": 0,      "status": {        "evaluated": true,        "evaluatedAt": "2019-08-24T14:15:22Z",        "reason": "string",        "value": 0      },      "threshold": 0,      "title": "string",      "unit": "percent",      "windowSeconds": 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. Defaults to 1h. Ignored when from and to are given.

Value in

  • "1h"
  • "24h"
  • "7d"
from?string

Inclusive start of an explicit range, such as a zoomed chart. Give it with to, at most 7 days wide and at least a minute.

Formatdate-time
to?string

Exclusive end of an explicit range. A later instant than now is read as now.

Formatdate-time

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,    "limitPerInstanceMilli": 0,    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ],    "unit": "percent"  },  "deployMarkers": [    {      "at": "2019-08-24T14:15:22Z",      "commit": "string",      "kind": "deploy",      "releaseNumber": 0    }  ],  "disk": [    {      "capacityBytes": 0,      "mountPath": "string",      "name": "string",      "points": [        {          "t": "2019-08-24T14:15:22Z",          "v": 0.1        }      ],      "reason": "string",      "sizeBytes": 0    }  ],  "errorRate": {    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ]  },  "from": "2019-08-24T14:15:22Z",  "instances": [    {      "cpuMilli": [        {          "t": "2019-08-24T14:15:22Z",          "v": 0.1        }      ],      "memoryBytes": [        {          "t": "2019-08-24T14:15:22Z",          "v": 0.1        }      ],      "pod": "string"    }  ],  "instancesTruncated": true,  "memory": {    "limitBytes": 0,    "limitPerInstanceBytes": 0,    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ],    "unit": "percent"  },  "network": {    "rxBytesPerSecond": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ],    "txBytesPerSecond": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ]  },  "p95Ms": {    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ]  },  "requestsPerMinute": {    "points": [      {        "t": "2019-08-24T14:15:22Z",        "v": 0.1      }    ]  },  "to": "2019-08-24T14:15:22Z",  "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    }  ]}