Skip to main content
POST
Preview notification routing

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Body

application/json
kind
string
required
severity
string
required
cluster_id
string<uuid4> | null
source_id
string | null

The source_id of the hypothetical notification, for routes with a source_id filter; a delivered notification's is the id of the alert that fired. A caller confined to a project may not name here a source_id a route would withhold from it (NotificationRoute.source_id says which): that answers 404 Source not found. A source_id that names nothing is previewed, because source_id is free text. A source_id is at most 512 bytes and carries at most 4 uuids: a longer one, or one with more uuids, answers 422.

alert_id
string<uuid4> | null
application_id
string<uuid4> | null

The application the hypothetical notification is about, for routes scoped to an application. A caller confined to a project may name only an application of that project: any other answers 404, as one that does not exist does.

reference
string | null

The concrete reference the hypothetical notification is about, for routes with a reference_pattern: refs/heads/, pull/ or refs/tags/.

project_id
string<uuid4> | null

The project the hypothetical notification belongs to. Absent reads it from cluster_id and application_id the way the relay does; a notification about neither belongs to no project and reaches only organisation-wide routes. A caller confined to a project may name only its own: any other answers 404, as one that does not exist does.

Response

Successful Response

kind
string
required
severity
string
required
cluster_id
string<uuid4> | null
required
source_id
string | null
required
alert_id
string<uuid4> | null
required
application_id
string<uuid4> | null
required

The application the hypothetical notification is about, for routes scoped to an application.

reference
string | null
required

The concrete reference the hypothetical notification is about, for routes with a reference_pattern: refs/heads/, pull/ or refs/tags/.

project_id
string | null
required

The project the walk evaluated the notification as belonging to; null is the organisation.

routable
boolean
required
routable_reason
string
required
deliveries
NotificationRoutePreviewDelivery · object[]
required
suppressed
NotificationRoutePreviewDelivery · object[]
required
route_evaluations
NotificationRoutePreviewEvaluation · object[]
required
home_destination_used
boolean
required