Reference
View as MarkdownNotifications API
11 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes
/notifications/alert-settingsGet the service alert thresholds
How long a service must be down, unhealthy or restarting before service.crashed, service.unhealthy and service.restart_loop are sent, when an incident closes, and when a backup counts as missed. Which channel receives which event is the channel's own event selection.
Response 200 · OK · application/json
- backupGraceMinutesinteger (int64)requiredExtra time a scheduled backup gets after its due time before backup.missed is sent. 0 = automatic: a quarter of the schedule's interval, between 15 minutes and 6 hours.
- crashGraceSecondsinteger (int64)requiredA container that stays down (or restarting) this long is announced as crashed. A restart Docker performed after a crash is announced at once.
- flapIncidentsinteger (int64)requiredIncidents within the flap window that make a flapping service: announced once, then silent until it has been stable for a whole window.
- flapWindowMinutesinteger (int64)requiredThe window incidents are counted in, and how long a flapping service must be stable before its recovery is sent.
- logLinesinteger (int64)requiredRuntime log lines attached to a crash or restart-loop message (redacted for the service's secrets). 0 attaches none.
- loopRestartsinteger (int64)requiredDocker restarts within the loop window that make a restart loop.
- loopWindowMinutesinteger (int64)requiredThe window the restarts are counted in.
- recoverAfterSecondsinteger (int64)requiredHow long a service must look healthy before the incident is closed and service.recovered is sent.
- unhealthyGraceSecondsinteger (int64)requiredThe health check must keep failing this long before service.unhealthy is sent.
401Unauthorized403Forbidden500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/alert-settingsSet the service alert thresholds
Replaces every threshold. Takes effect within a minute.
Request body · application/json · required
- backupGraceMinutesinteger (int64)requiredExtra time a scheduled backup gets after its due time before backup.missed is sent. 0 = automatic: a quarter of the schedule's interval, between 15 minutes and 6 hours.
- crashGraceSecondsinteger (int64)requiredA container that stays down (or restarting) this long is announced as crashed. A restart Docker performed after a crash is announced at once.
- flapIncidentsinteger (int64)requiredIncidents within the flap window that make a flapping service: announced once, then silent until it has been stable for a whole window.
- flapWindowMinutesinteger (int64)requiredThe window incidents are counted in, and how long a flapping service must be stable before its recovery is sent.
- logLinesinteger (int64)requiredRuntime log lines attached to a crash or restart-loop message (redacted for the service's secrets). 0 attaches none.
- loopRestartsinteger (int64)requiredDocker restarts within the loop window that make a restart loop.
- loopWindowMinutesinteger (int64)requiredThe window the restarts are counted in.
- recoverAfterSecondsinteger (int64)requiredHow long a service must look healthy before the incident is closed and service.recovered is sent.
- unhealthyGraceSecondsinteger (int64)requiredThe health check must keep failing this long before service.unhealthy is sent.
Response 200 · OK · application/json
- backupGraceMinutesinteger (int64)requiredExtra time a scheduled backup gets after its due time before backup.missed is sent. 0 = automatic: a quarter of the schedule's interval, between 15 minutes and 6 hours.
- crashGraceSecondsinteger (int64)requiredA container that stays down (or restarting) this long is announced as crashed. A restart Docker performed after a crash is announced at once.
- flapIncidentsinteger (int64)requiredIncidents within the flap window that make a flapping service: announced once, then silent until it has been stable for a whole window.
- flapWindowMinutesinteger (int64)requiredThe window incidents are counted in, and how long a flapping service must be stable before its recovery is sent.
- logLinesinteger (int64)requiredRuntime log lines attached to a crash or restart-loop message (redacted for the service's secrets). 0 attaches none.
- loopRestartsinteger (int64)requiredDocker restarts within the loop window that make a restart loop.
- loopWindowMinutesinteger (int64)requiredThe window the restarts are counted in.
- recoverAfterSecondsinteger (int64)requiredHow long a service must look healthy before the incident is closed and service.recovered is sent.
- unhealthyGraceSecondsinteger (int64)requiredThe health check must keep failing this long before service.unhealthy is sent.
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/channelsList notification channels
Credentials are never returned; secrets holds masked hints of the ones that are set.
Response 200 · OK · application/json
- ChannelView[] | nullrequired
401Unauthorized403Forbidden500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/channelsAdd a notification channel
Kinds: email (SMTP: host, port, tls implicit|starttls|none, username, from, to; password in secrets), slack and discord (webhook URL in secrets.url), telegram (config.chatId, bot token in secrets.botToken) and webhook (URL in secrets.url; every request is signed with HMAC-SHA256 in the X-NebulaCtrl-Signature header). A webhook's signing secret is generated when omitted and returned once. Not idempotent: the response can carry that secret, so a repeated name answers 409 channel_conflict instead of replaying it. Requires the admin scope.
Request body · application/json · required
- ChannelConfig
- enabledbooleanDefault true.
- kindenum: email | slack | discord | telegram | webhookrequired
- namestringrequired
- ChannelRuleInput
- ChannelSecretsInput
Response 201 · Created · application/json
- ChannelViewrequired
- signingSecretstringWebhook channels: the generated signing secret. Shown only in this response; store it now. Rotate it to get a new one.
401Unauthorized403Forbidden409Conflictchannel_conflict422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/channels/{channelId}Get a notification channel
| Parameter | In | Type | Description |
|---|---|---|---|
channelIdrequired | path | string |
Response 200 · OK · application/json
- ChannelConfigrequired
- createdAtstring (date-time)required
- enabledbooleanrequired
- idstringrequired
- kindenum: email | slack | discord | telegram | webhookrequired
- namestringrequired
- ChannelRulerequired
- map of stringrequiredMasked hints of the stored secrets, keyed by name (url, botToken, password, signingSecret). A key is present when the secret is set; its value never reveals it.
- ChannelStatsrequired
- ChannelTestStaterequired
- updatedAtstring (date-time)required
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/channels/{channelId}Update a notification channel
Omitted fields stay as they are; empty credentials keep the stored ones. The kind can not change.
| Parameter | In | Type | Description |
|---|---|---|---|
channelIdrequired | path | string |
Request body · application/json · required
- ChannelConfig
- enabledboolean
- namestring
- ChannelRuleInput
- ChannelSecretsInput
Response 200 · OK · application/json
- ChannelConfigrequired
- createdAtstring (date-time)required
- enabledbooleanrequired
- idstringrequired
- kindenum: email | slack | discord | telegram | webhookrequired
- namestringrequired
- ChannelRulerequired
- map of stringrequiredMasked hints of the stored secrets, keyed by name (url, botToken, password, signingSecret). A key is present when the secret is set; its value never reveals it.
- ChannelStatsrequired
- ChannelTestStaterequired
- updatedAtstring (date-time)required
401Unauthorized403Forbidden409Conflict422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/channels/{channelId}Delete a notification channel
Deletes the channel and its delivery log.
| Parameter | In | Type | Description |
|---|---|---|---|
channelIdrequired | path | string |
Response 204 · No Content
No body.
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/channels/{channelId}/deliveriesList a channel's deliveries
The delivery log, newest first, kept for 30 days: status (pending, retrying, delivered, failed), attempts, the last error and the response code. Errors never contain credentials.
| Parameter | In | Type | Description |
|---|---|---|---|
channelIdrequired | path | string | |
status | query | enum: pending | retrying | delivered | failed | Only deliveries in this status. |
cursor | query | string | Opaque cursor from a previous page's nextCursor |
limit | query | integer (int64) | Page size (default 50, max 200) |
Response 200 · OK · application/json
- ChannelDelivery[] | nullrequired
- nextCursorstringPresent when older deliveries exist
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/channels/{channelId}/rotate-secretRotate a webhook signing secret
Webhook channels only. The new secret is returned once; deliveries are signed with it from now on.
| Parameter | In | Type | Description |
|---|---|---|---|
channelIdrequired | path | string |
Response 200 · OK · application/json
- signingSecretstringrequiredThe new signing secret. Shown only in this response.
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/channels/{channelId}/testSend a test notification
Sends a test message through the channel right now and returns the delivery that records the result (status delivered or failed, with the error and response code). The test is not queued, retried, rate limited or deduplicated, and works on a disabled channel. It also updates the channel's test state.
| Parameter | In | Type | Description |
|---|---|---|---|
channelIdrequired | path | string |
Response 200 · OK · application/json
- attemptsinteger (int64)required
- bodystring
- channelIdstringrequired
- createdAtstring (date-time)required
- deliveredAtstring (date-time)
- eventTypestringrequired
- MessageField[] | null
- idstringrequired
- isTestbooleanrequired
- lastErrorstringrequiredWhy the last attempt failed; credentials are masked.
- maxAttemptsinteger (int64)required
- nextAttemptAtstring (date-time)
- projectIdstring
- responseCodeinteger (int64)HTTP status or SMTP reply code of the last attempt.
- severityenum: info | warning | errorrequired
- statusenum: pending | retrying | delivered | failedrequired
- titlestringrequired
- urlstring
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/notifications/event-typesList notification event types
The events a channel can subscribe to, grouped, with their default severity and whether new channels subscribe by default.
Response 200 · OK · application/json
- ChannelEventType[] | nullrequired
401Unauthorized403Forbidden500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.