Alert sources
External tools that fire and resolve alerts in Spectate: Prometheus Alertmanager, Grafana, Sentry, email, or your own scripts through a webhook. Each source has its own secret URL (and email address); its alerts follow its escalation paths.
List alert sources
Returns the team's alert sources, by name.
query Parameters
filter[type]Only sources of this tool.
The external tool behind an alert source; decides how its requests are read.
webhook Spectate's own JSON format, for scripts, CI and anything that can call a URL. |
email Emails to the source's own address (subject becomes the alert). |
alertmanager Prometheus Alertmanager webhook_configs. |
grafana Grafana Alerting webhook contact point (Alertmanager format plus Grafana links). |
sentry Sentry internal integration webhooks (SaaS and self-hosted), or the legacy WebHooks plugin. |
pagePage number, from 1.
per_pageSources per page, 1 to 100.
List alert sources › Responses
Paginated set of AlertSource
current_pagefirst_page_urlfromlast_page_urllast_pageGenerated paginator links.
next_page_urlpathBase path for paginator generated URLs.
per_pageNumber of items shown per page.
prev_page_urltoNumber of the last item in the slice.
totalTotal number of items being paginated.
Create an alert source
Returns the source with its webhook_url (and email_address for email) to set up in the
tool. Email sources resolve alerts after an hour without a repeat unless
auto_resolve_minutes says otherwise: mail has no "resolved".
Create an alert source › Request Body
nameName shown on its alerts, up to 255 characters
typeThe tool that will send requests
webhook Spectate's own JSON format, for scripts, CI and anything that can call a URL. |
email Emails to the source's own address (subject becomes the alert). |
alertmanager Prometheus Alertmanager webhook_configs. |
grafana Grafana Alerting webhook contact point (Alertmanager format plus Grafana links). |
sentry Sentry internal integration webhooks (SaaS and self-hosted), or the legacy WebHooks plugin. |
default_severitySeverity of alerts sent without one. Default high
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
auto_resolve_minutesMinutes, 5 to 10080, after which an alert the tool stopped repeating resolves; null keeps it until resolved. Default null, or 60 for email sources
secretSigning secret the tool uses: Sentry client secret, Grafana HMAC secret or Alertmanager bearer token. Write-only
Type-specific settings
project_idProject whose escalation paths apply when the source has none of its own
escalation_path_idsEscalation paths for the source's alerts
Create an alert source › Responses
The new alert source.
idAlert source ID
nameName shown on its alerts
typeThe tool, which decides how requests are read
webhook Spectate's own JSON format, for scripts, CI and anything that can call a URL. |
email Emails to the source's own address (subject becomes the alert). |
alertmanager Prometheus Alertmanager webhook_configs. |
grafana Grafana Alerting webhook contact point (Alertmanager format plus Grafana links). |
sentry Sentry internal integration webhooks (SaaS and self-hosted), or the legacy WebHooks plugin. |
enabledWhether requests fire alerts; a disabled source rejects them
webhook_urlWhere the tool sends its webhooks. Secret: rotate it with rotateAlertSourceToken if it leaks
email_addressemail sources: the address to send mails to. Secret like the URL
has_secretWhether a signing secret is set (Sentry client secret, Grafana HMAC secret, Alertmanager bearer token); it's never returned
default_severitySeverity of alerts the tool sends without one
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
auto_resolve_minutesMinutes after which an alert the tool stopped repeating resolves; null keeps it until the tool resolves it
Type-specific settings
project_idThe project whose escalation paths apply when the source has none of its own; null for none
Escalation paths the source's alerts follow. Empty: the project's paths, else the team's default path
last_event_atWhen the source last received a request
events_countRequests the source has received in total
firing_alerts_countAlerts of the source that are firing now
created_atWhen the source was created
Get an alert source
Returns the source with its URL and how many of its alerts are firing.
path Parameters
sourceAlert source ID.
Get an alert source › Responses
The alert source.
idAlert source ID
nameName shown on its alerts
typeThe tool, which decides how requests are read
webhook Spectate's own JSON format, for scripts, CI and anything that can call a URL. |
email Emails to the source's own address (subject becomes the alert). |
alertmanager Prometheus Alertmanager webhook_configs. |
grafana Grafana Alerting webhook contact point (Alertmanager format plus Grafana links). |
sentry Sentry internal integration webhooks (SaaS and self-hosted), or the legacy WebHooks plugin. |
enabledWhether requests fire alerts; a disabled source rejects them
webhook_urlWhere the tool sends its webhooks. Secret: rotate it with rotateAlertSourceToken if it leaks
email_addressemail sources: the address to send mails to. Secret like the URL
has_secretWhether a signing secret is set (Sentry client secret, Grafana HMAC secret, Alertmanager bearer token); it's never returned
default_severitySeverity of alerts the tool sends without one
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
auto_resolve_minutesMinutes after which an alert the tool stopped repeating resolves; null keeps it until the tool resolves it
Type-specific settings
project_idThe project whose escalation paths apply when the source has none of its own; null for none
Escalation paths the source's alerts follow. Empty: the project's paths, else the team's default path
last_event_atWhen the source last received a request
events_countRequests the source has received in total
firing_alerts_countAlerts of the source that are firing now
created_atWhen the source was created
Update an alert source
Changes only the fields you send; settings merge into the current settings.
path Parameters
sourceAlert source ID.
Update an alert source › Request Body
nameName shown on its alerts
enabledWhether requests fire alerts
default_severitySeverity of alerts sent without one
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
auto_resolve_minutesMinutes, 5 to 10080, after which an alert the tool stopped repeating resolves; null keeps it until resolved
secretSigning secret; an empty string or null removes it. Write-only
Type-specific settings; settings you leave out keep their value
project_idProject whose escalation paths apply; null for none
escalation_path_idsEscalation paths for the source's alerts; replaces the current ones
Update an alert source › Responses
The updated alert source.
idAlert source ID
nameName shown on its alerts
typeThe tool, which decides how requests are read
webhook Spectate's own JSON format, for scripts, CI and anything that can call a URL. |
email Emails to the source's own address (subject becomes the alert). |
alertmanager Prometheus Alertmanager webhook_configs. |
grafana Grafana Alerting webhook contact point (Alertmanager format plus Grafana links). |
sentry Sentry internal integration webhooks (SaaS and self-hosted), or the legacy WebHooks plugin. |
enabledWhether requests fire alerts; a disabled source rejects them
webhook_urlWhere the tool sends its webhooks. Secret: rotate it with rotateAlertSourceToken if it leaks
email_addressemail sources: the address to send mails to. Secret like the URL
has_secretWhether a signing secret is set (Sentry client secret, Grafana HMAC secret, Alertmanager bearer token); it's never returned
default_severitySeverity of alerts the tool sends without one
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
auto_resolve_minutesMinutes after which an alert the tool stopped repeating resolves; null keeps it until the tool resolves it
Type-specific settings
project_idThe project whose escalation paths apply when the source has none of its own; null for none
Escalation paths the source's alerts follow. Empty: the project's paths, else the team's default path
last_event_atWhen the source last received a request
events_countRequests the source has received in total
firing_alerts_countAlerts of the source that are firing now
created_atWhen the source was created
Rotate the source's URL
Gives the source a new secret webhook_url (and email_address); the old ones stop working
at once, so update the tool right after.
path Parameters
sourceAlert source ID.
Rotate the source's URL › Responses
The source with its new URL.
idAlert source ID
nameName shown on its alerts
typeThe tool, which decides how requests are read
webhook Spectate's own JSON format, for scripts, CI and anything that can call a URL. |
email Emails to the source's own address (subject becomes the alert). |
alertmanager Prometheus Alertmanager webhook_configs. |
grafana Grafana Alerting webhook contact point (Alertmanager format plus Grafana links). |
sentry Sentry internal integration webhooks (SaaS and self-hosted), or the legacy WebHooks plugin. |
enabledWhether requests fire alerts; a disabled source rejects them
webhook_urlWhere the tool sends its webhooks. Secret: rotate it with rotateAlertSourceToken if it leaks
email_addressemail sources: the address to send mails to. Secret like the URL
has_secretWhether a signing secret is set (Sentry client secret, Grafana HMAC secret, Alertmanager bearer token); it's never returned
default_severitySeverity of alerts the tool sends without one
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
auto_resolve_minutesMinutes after which an alert the tool stopped repeating resolves; null keeps it until the tool resolves it
Type-specific settings
project_idThe project whose escalation paths apply when the source has none of its own; null for none
Escalation paths the source's alerts follow. Empty: the project's paths, else the team's default path
last_event_atWhen the source last received a request
events_countRequests the source has received in total
firing_alerts_countAlerts of the source that are firing now
created_atWhen the source was created
Fire a test alert
Fires an alert on the source that escalates like a real one (it notifies people) and resolves itself after a few minutes. Returns the event it made.
path Parameters
sourceAlert source ID.
Fire a test alert › Responses
The test event.
idEvent ID
received_atWhen the request arrived
outcomeWhat became of it
fired It fired at least one new alert. |
resolved It resolved at least one alert. |
updated It repeated alerts that were already firing. |
test A test request from the tool's own "test" button; no alert. |
ignored Valid, but nothing to do (for example a resolve of an alert that isn't firing). |
rejected Refused: bad signature, unreadable payload or a disabled source; see error. |
summaryWhat happened, in words
errorWhy it was rejected, with outcome rejected
What it did per alert
The request body as received: the tool's JSON, or {body, truncated} for mail and non-JSON bodies. Its shape is the tool's
List a source's events
Returns the requests the source received in the last 7 days, newest first, with what each did. Use it to check that a tool reaches Spectate.
path Parameters
sourceAlert source ID.
query Parameters
pagePage number, from 1.
per_pageEvents per page, 1 to 100.
List a source's events › Responses
Paginated set of AlertSourceEvent
current_pagefirst_page_urlfromlast_page_urllast_pageGenerated paginator links.
next_page_urlpathBase path for paginator generated URLs.
per_pageNumber of items shown per page.
prev_page_urltoNumber of the last item in the slice.
totalTotal number of items being paginated.