Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Notifications

Your notification inbox, and the Slack and PagerDuty channels of the organization. Each operation lists its method and path, parameters, request body, responses and an example call.

GET/api/v1/notification-channels

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

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/notification-channels"
{  "$schema": "https://example.com/ListChannelsOutputBody.json",  "items": [    {      "$schema": "https://example.com/ChannelOutput.json",      "createdAt": "2019-08-24T14:15:22Z",      "enabled": true,      "events": [        "string"      ],      "hint": "string",      "id": "string",      "kind": "slack",      "label": "string",      "lastDeliveredAt": "2019-08-24T14:15:22Z",      "lastError": "string"    }  ]}
POST/api/v1/notification-channels

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

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/api/v1/notification-channels" \  -H "Content-Type: application/json" \  -d '{    "events": [      "string"    ],    "kind": "slack",    "label": "string",    "secret": "string"  }'
{  "$schema": "https://example.com/ChannelOutput.json",  "createdAt": "2019-08-24T14:15:22Z",  "enabled": true,  "events": [    "string"  ],  "hint": "string",  "id": "string",  "kind": "slack",  "label": "string",  "lastDeliveredAt": "2019-08-24T14:15:22Z",  "lastError": "string"}
PATCH/api/v1/notification-channels/{id}

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

Channel id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PATCH "https://example.com/api/v1/notification-channels/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "$schema": "https://example.com/ChannelOutput.json",  "createdAt": "2019-08-24T14:15:22Z",  "enabled": true,  "events": [    "string"  ],  "hint": "string",  "id": "string",  "kind": "slack",  "label": "string",  "lastDeliveredAt": "2019-08-24T14:15:22Z",  "lastError": "string"}
DELETE/api/v1/notification-channels/{id}

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

Channel id.

Response Body

application/problem+json

curl -X DELETE "https://example.com/api/v1/notification-channels/string"
Empty
POST/api/v1/notification-channels/{id}/test

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

Channel id.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/notification-channels/string/test"
{  "$schema": "https://example.com/TestChannelOutputBody.json",  "channel": {    "$schema": "https://example.com/ChannelOutput.json",    "createdAt": "2019-08-24T14:15:22Z",    "enabled": true,    "events": [      "string"    ],    "hint": "string",    "id": "string",    "kind": "slack",    "label": "string",    "lastDeliveredAt": "2019-08-24T14:15:22Z",    "lastError": "string"  },  "delivered": true}
GET/api/v1/notifications

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

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
unread?boolean

Only notifications not yet read.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/notifications"
{  "$schema": "https://example.com/ListNotificationsOutputBody.json",  "items": [    {      "body": "string",      "createdAt": "2019-08-24T14:15:22Z",      "id": "string",      "kind": "approval",      "link": {        "approvalId": "string",        "clusterId": "string",        "deploymentId": "string",        "environmentId": "string",        "projectId": "string",        "serviceId": "string",        "tab": "string",        "type": "approval"      },      "readAt": "2019-08-24T14:15:22Z",      "title": "string"    }  ],  "nextCursor": "string",  "unreadCount": 0}
POST/api/v1/notifications/read

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

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/api/v1/notifications/read" \  -H "Content-Type: application/json" \  -d '{}'
{  "$schema": "https://example.com/MarkReadOutputBody.json",  "unreadCount": 0,  "updated": 0}