Slack Manager REST API (0.30.0)

Send alerts to Slack Manager, which groups them into issues in Slack channels.

The REST API of the Slack Manager core library (github.com/slackmgr/core/restapi). It accepts alerts from monitoring systems and other clients, validates and routes them to a Slack channel, and queues them for the manager, which creates and updates issues in Slack.

The API is embedded in a host application, so the base URL, port and any authentication depend on the deployment. The default port is 8080.

Routing

The Slack channel of an alert is determined in this order:

  1. The slackChannelId field in the alert body
  2. The slackChannelId path parameter (for the endpoints that have one)
  3. A routing rule matching the alert routeKey (and type)
  4. The fallback routing rule, if the alert has no route key

Channel names are accepted in place of channel IDs, and are mapped to IDs by the API (for channels that the Slack Manager integration is a member of).

Rate limiting

Alerts are rate limited per Slack channel with a token bucket. A request is accepted or rejected as a whole: if any channel in the request has too few tokens left, the request is rejected with HTTP 429 and no alert is queued. All alerts and channels are validated before the rate limit is checked, so a rejected request can be retried without duplicating alerts. Accepted and rate limited requests get RateLimit-* headers (IETF draft-ietf-httpapi-ratelimit-headers-11) for the most constrained channel in the request.

Errors

All error responses have a JSON body with a single error field. Requests that take longer than 30 seconds are aborted with HTTP 503.

This document is the source of truth for the API contract. It is served by the API itself at GET /openapi.yaml.

Overview
Servers
Local instance on the default port
http://localhost:8080