Project: Grafana (Observability and Analysis / Observability)
File: alerting_provisioning.md

labels: products: enterprise oss title: 'Alerting Provisioning HTTP API ' The Alerting provisioning API can be used to create, modify, and delete resources relevant to . And is the one used by our . For managing resources related to including Recording Rules, you can use and respectively. 1.1.0 application/json application/json text/yaml application/yaml | Method | URI | Name | Summary | | | - | -- | | | DELETE | /api/v1/provisioning/alert-rules/:uid | | Delete a specific alert rule by UID. | | GET | /api/v1/provisioning/alert-rules/:uid | | Get a specific alert rule by UID. | | POST | /api/v1/provisioning/alert-rules | | Create a new alert rule. | | PUT | /api/v1/provisioning/alert-rules/:uid | | Update an existing alert rule. | | GET | /api/v1/provisioning/alert-rules/:uid/export | | Export an alert rule in provisioning file format. | | GET | /api/v1/provisioning/folder/:folderUid/rule-groups/:group | | Get a rule group. | | PUT | /api/v1/provisioning/folder/:folderUid/rule-groups/:group | | Update the interval of a rule group or modify the rules of the group. | | GET | /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export | | Export an alert rule group in provisioning file format. | | GET | /api/v1/provisioning/alert-rules | | Get all the alert rules. | | GET | /api/v1/provisioning/alert-rules/export | | Export all alert rules in provisioning file format. | ```json { "title": "TEST-API_1", "ruleGroup": "API", "folderUID": "FOLDER", "noDataState": "OK", "execErrState": "OK", "for": "5m", "orgId": 1, "uid": "", "condition": "B", "annotations": { "summary": "testapi1" }, "labels": { "API": "test1" }, "data": [ { "refId": "A", "queryType": "", "relativeTimeRange": { "from": 600, "to": 0 }, "datasourceUid": " XXXXXXXXX-XXXXXXXXX-XXXXXXXXXX", "model": { "expr": "up", "hide": false, "intervalMs": 1000, "maxDataPoints": 43200, "refId": "A" } }, { "refId": "B", "queryType": "", "relativeTimeRange": { "from": 0, "to": 0 }, "datasourceUid": "-100", "model": { "conditions": [ { "evaluator": { "params": [6], "type": "gt" }, "operator": { "type": "and" }, "query": { "params": ["A"] }, "reducer": { "params": [], "type": "last" }, "type": "query" } ], "datasource": { "type": "expr", "uid": "-100" }, "hide": false, "intervalMs": 1000, "maxDataPoints": 43200, "refId": "B", "type": "classic_conditions" } } ] } ``` | Method | URI | Name | Summary | | | | -- | | | DELETE | /api/v1/provisioning/contact-points/:uid | | Delete a contact point. | | GET | /api/v1/provisioning/contact-points | | Get all the contact points. | | POST | /api/v1/provisioning/contact-points | | Create a contact point. | | PUT | /api/v1/provisioning/contact-points/:uid | | Update an existing contact point. | | GET | /api/v1/provisioning/contact-points/export | | Export all contact points in provisioning file format. | | Method | URI | Name | Summary | | | | - | - | | DELETE | /api/v1/provisioning/policies | | Clears the notification policy tree. | | GET | /api/v1/provisioning/policies | | Get the notification policy tree. | | PUT | /api/v1/provisioning/policies | | Sets the notification policy tree. | | GET | /api/v1/provisioning/policies/export | | Export the notification policy tree in provisioning file format. | | Method | URI | Name | Summary | | | - | | - | | DELETE | /api/v1/provisioning/mute-timings/:name | | Delete a mute timing. | | GET | /api/v1/provisioning/mute-timings/:name | | Get a mute timing. | | GET | /api/v1/provisioning/mute-timings | | Get all the mute timings. | | POST | /api/v1/provisioning/mute-timings | | Create a new mute timing. | | PUT | /api/v1/provisioning/mute-timings/:name | | Replace an existing mute timing. | | GET | /api/v1/provisioning/mute-timings/export | | Export all mute timings in provisioning file format. | | GET | /api/v1/provisioning/mute-timings/:name/export | | Export a mute timing in provisioning file

| | Method | URI | Name | Summary | | | | -- | -- | | DELETE | /api/v1/provisioning/templates/:name | | Delete a template. | | GET | /api/v1/provisioning/templates/:name | | Get a notification template. | | GET | /api/v1/provisioning/templates | | Get all notification templates. | | PUT | /api/v1/provisioning/templates/:name | | Create or update a notification template. | By default, you cannot edit API-provisioned alerting resources in Grafana. To enable editing these resources in the Grafana UI, add the `X-Disable-Provenance` header to the following requests in the API: `POST /api/v1/provisioning/alert-rules` `PUT /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}` (calling this endpoint will change provenance for all alert rules within the alert group) `POST /api/v1/provisioning/contact-points` `POST /api/v1/provisioning/mute-timings` `PUT /api/v1/provisioning/policies` `PUT /api/v1/provisioning/templates/{name}` To reset the notification policy tree to the default and unlock it for editing in the Grafana UI, use the `DELETE /api/v1/provisioning/policies` endpoint. ``` DELETE /api/v1/provisioning/alert-rules/:uid ``` {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | | -- | | :: | - | | | UID | `path` | string | `string` | | | | Alert rule UID | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | -- | - | - | :: | | | | No Content | The alert rule was deleted successfully. | | | Status: No Content ``` DELETE /api/v1/provisioning/contact-points/:uid ``` application/json | Name | Source | Type | Go type | Separator | Required | Default | Description | | - | | | -- | | :: | - | | | UID | `path` | string | `string` | | | | UID is the contact point unique identifier | | Code | Status | Description | Has headers | Schema | | -- | - | - | :: | | | | No Content | The contact point was deleted successfully. | | | Status: No Content ``` DELETE /api/v1/provisioning/mute-timings/:name ``` | Name | Source | Type | Go type | Separator | Required | Default | Description | | - | | | -- | | :: | - | - | | name | `path` | string | `string` | | | | Mute timing name | | Code | Status | Description | Has headers | Schema | | | - | -- | :: | - | | | No Content | The mute timing was deleted successfully. | | | Status: No Content ``` DELETE /api/v1/provisioning/templates/:name ``` | Name | Source | Type | Go type | Separator | Required | Default | Description | | - | | | -- | | :: | - | - | | name | `path` | string | `string` | | | | Template Name | | Code | Status | Description | Has headers | Schema | | | - | -- | :: | - | | | No Content | The template was deleted

| | | Status: No Content ``` GET /api/v1/provisioning/alert-rules/:uid ``` | Name | Source | Type | Go type | Separator | Required | Default | Description | | - | | | -- | | :: | - | -- | | UID | `path` | string | `string` | | | | Alert rule UID | | Code | Status | Description | Has headers | Schema | | -- | | -- | :: | | | | OK | ProvisionedAlertRule | | | | | Not Found | Not found. | | | Status: OK Status: Not Found ``` GET /api/v1/provisioning/alert-rules/:uid/export ``` application/json application/yaml application/terraform+hcl text/yaml text/hcl | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | - | - | -- | | :: | -- | -- | | UID | `path` | string | `string` | | | | Alert rule UID | | download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. | | format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. | | Code | Status | Description | Has headers | Schema | | | | | :: | - | | | OK | AlertingFileExport | | | | | Not Found | Not found. | | | Status: OK Status: Not Found ``` GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group ``` | Name | Source | Type | Go type | Separator | Required | Default | Description | | | | | -- | | :: | - | -- | | FolderUID | `path` | string | `string` | | | | | | Group | `path` | string | `string` | | | | | | Code | Status | Description | Has headers | Schema | | -- | | -- | :: | | | | OK | AlertRuleGroup | | | | | Not Found | Not found. | | | Status: OK Status: Not Found ``` GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export ``` application/json application/yaml application/terraform+hcl text/yaml text/hcl | Name | Source | Type | Go type | Separator | Required | Default | Description | | | - | - | -- | | :: | -- | -- | | FolderUID | `path` | string | `string` | | | | | | Group | `path` | string | `string` | | | | | | download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. | | format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. | | Code | Status | Description | Has headers | Schema | | | | | :: | - | | | OK | AlertingFileExport | | | | | Not Found | Not found. | | | Status: OK Status: Not Found ``` GET /api/v1/provisioning/alert-rules ``` | Code | Status | Description | Has headers | Schema | | | | | :: | - | | | OK | ProvisionedAlertRules | | | Status: OK ``` GET /api/v1/provisioning/alert-rules/export ``` application/json application/yaml application/terraform+hcl text/yaml text/hcl | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | - | - | -- | | :: | -- | -- | | download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. | | format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or

Accept header can also be used, but the query parameter will take precedence. | | Code | Status | Description | Has headers | Schema | | - | | | :: | -- | | | OK | AlertingFileExport | | | | | Not Found | Not found. | | | Status: OK Status: Not Found ``` GET /api/v1/provisioning/contact-points ``` | Name | Source | Type | Go type | Separator | Required | Default | Description | | - | - | | -- | | :: | - | -- | | name | `query` | string | `string` | | | | Filter by name | | Code | Status | Description | Has headers | Schema | | -- | | - | :: | | | | OK | ContactPoints | | | Status: OK ``` GET /api/v1/provisioning/contact-points/export ``` application/json application/yaml application/terraform+hcl text/yaml text/hcl | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | - | - | -- | | :: | -- | -- | | decrypt | `query` | boolean | `bool` | | | | Whether any contained secure settings should be decrypted or left redacted. Redacted settings will contain RedactedValue instead. Currently, only org admin can view decrypted secure settings. | | download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. | | format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. | | name | `query` | string | `string` | | | | Filter by name | | Code | Status | Description | Has headers | Schema | | | | | :: | - | | | OK | AlertingFileExport | | | | | Forbidden | PermissionDenied | | | Status: OK Status: Forbidden ``` GET /api/v1/provisioning/mute-timings/:name ``` | Name | Source | Type | Go type | Separator | Required | Default | Description | | - | | | -- | | :: | - | - | | name | `path` | string | `string` | | | | Mute timing name | | Code | Status | Description | Has headers | Schema | | | | - | :: | - | | | OK | MuteTimeInterval | | | | | Not Found | Not found. | | | Status: OK Status: Not Found ``` GET /api/v1/provisioning/mute-timings ``` | Code | Status | Description | Has headers | Schema | | - | | -- | :: | -- | | | OK | MuteTimings | | | Status: OK ``` GET /api/v1/provisioning/mute-timings/export ``` application/json application/yaml application/terraform+hcl text/yaml text/hcl | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | - | - | -- | | :: | -- | -- | | download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. | | format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take

| | Code | Status | Description | Has headers | Schema | | -- | | -- | :: | | | | OK | MuteTimingsExport | | | | | Forbidden | PermissionDenied | | | Status: OK Status: Forbidden ``` GET /api/v1/provisioning/mute-timings/:name/export ``` application/json application/yaml application/terraform+hcl text/yaml text/hcl | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | - | - | -- | | :: | -- | -- | | name | `path` | string | `string` | | | | Mute timing name. | | download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. | | format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. | | Code | Status | Description | Has headers | Schema | | - | | - | :: | | | | OK | MuteTimingExport | | | | | Forbidden | PermissionDenied | | | Status: OK Status: Forbidden ``` GET /api/v1/provisioning/policies ``` | Code | Status | Description | Has headers | Schema | | | | -- | :: | - | | | OK | Route | | | Status: OK ``` GET /api/v1/provisioning/policies/export ``` application/json application/yaml application/terraform+hcl text/yaml text/hcl | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | - | - | -- | | :: | -- | -- | | download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. | | format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. | | Code | Status | Description | Has headers | Schema | | - | | | :: | -- | | | OK | AlertingFileExport | | | | | Not Found | NotFound | | | Status: OK Status: Not Found ``` GET /api/v1/provisioning/templates/:name ``` | Name | Source | Type | Go type | Separator | Required | Default | Description | | - | | | -- | | :: | - | - | | name | `path` | string | `string` | | | | Template Name | | Code | Status | Description | Has headers | Schema | | | | -- | :: | - | | | OK | NotificationTemplate | | | | | Not Found | Not found. | | | Status: OK Status: Not Found ``` GET /api/v1/provisioning/templates ``` | Code | Status | Description | Has headers | Schema | | - | | | :: | -- | | | OK | NotificationTemplates | | | | | Not Found | Not found. | | | Status: OK Status: Not Found ``` POST /api/v1/provisioning/alert-rules ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | -- | -- | | :: | - | | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | |

| | | | | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | | -- | -- | :: | - | | | Created | ProvisionedAlertRule | | | | | Bad Request | ValidationError | | | Status: Created Status: Bad Request ``` POST /api/v1/provisioning/contact-points ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | -- | -- | | :: | - | | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | | `models.EmbeddedContactPoint` | | | | | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | | -- | -- | :: | - | | | Accepted | EmbeddedContactPoint | | | | | Bad Request | ValidationError | | | Status: Accepted Status: Bad Request ``` POST /api/v1/provisioning/mute-timings ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | | - | | :: | - | | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | | `models.MuteTimeInterval` | | | | | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | - | -- | - | :: | -- | | | Created | MuteTimeInterval | | | | | Bad Request | ValidationError | | | Status: Created Status: Bad Request ``` PUT /api/v1/provisioning/alert-rules/:uid ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | -- | -- | | :: | - | | | UID | `path` | string | `string` | | | | Alert rule UID | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | | `models.ProvisionedAlertRule` | | | | | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | -- | -- | -- | :: | | | | OK | ProvisionedAlertRule | | | | | Bad Request | ValidationError | | | Status: OK Status: Bad Request ``` PUT /api/v1/provisioning/folder/:folderUid/rule-groups/:group ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | -- | -- | | :: | - | - | | FolderUID | `path` | string | `string` | | | | | | Group | `path` | string | `string` | | | | | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | |

| | | | This action is idempotent and rules included in this body will overwrite configured rules for the group | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | -- | -- | | :: | | | | OK | AlertRuleGroup | | | | | Bad Request | ValidationError | | | Status: OK Status: Bad Request ``` PUT /api/v1/provisioning/contact-points/:uid ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | -- | -- | | :: | - | | | UID | `path` | string | `string` | | | | UID is the contact point unique identifier | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | | `models.EmbeddedContactPoint` | | | | | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | - | -- | | :: | -- | | | Accepted | Ack | | | | | Bad Request | ValidationError | | | Status: Accepted Status: Bad Request ``` PUT /api/v1/provisioning/mute-timings/:name ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | | - | | :: | - | | | name | `path` | string | `string` | | | | Mute timing name | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | | `models.MuteTimeInterval` | | | | | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | | -- | - | :: | - | | | OK | MuteTimeInterval | | | | | Bad Request | ValidationError | | | Status: OK Status: Bad Request ``` PUT /api/v1/provisioning/policies ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | | -- | | :: | - | | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | | `models.Route` | | | | The new notification routing tree to use | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | | -- | | :: | - | | | Accepted | Ack | | | | | Bad Request | ValidationError | | | Status: Accepted Status: Bad Request ``` PUT /api/v1/provisioning/templates/:name ``` application/json {{% responsive-table %}} | Name | Source | Type | Go type | Separator | Required | Default | Description | | -- | -- | - | | | :: | - | | | name | `path` | string | `string` | | | | Template Name | | X-Disable-Provenance: true | `header` | string | `string` | | | | Allows editing of provisioned resources in the Grafana UI | | Body | `body` | |

| | | | | {{% /responsive-table %}} | Code | Status | Description | Has headers | Schema | | | -- | -- | :: | - | | | Accepted | NotificationTemplate | | | | | Bad Request | ValidationError | | | Status: Accepted Status: Bad Request ``` DELETE /api/v1/provisioning/policies ``` application/json | Code | Status | Description | Has headers | Schema | | -- | -- | -- | :: | | | | Accepted | Ack | | | Status: Accepted Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | | -- | - | :: | - | | - | | datasourceUid | string | `string` | | | Grafana data source unique identifier; it should be 'expr' for a Server Side Expression operation. | | | model | | `interface{}` | | | JSON is the raw JSON query and includes the above properties as well as custom properties. | | | queryType | string | `string` | | | QueryType is an optional identifier for the type of query. | | It can be used to distinguish different types of queries. | | | refId | string | `string` | | | RefID is the unique identifier of the query, set by the frontend

| | | relativeTimeRange | | `RelativeTimeRange` | | | | | {{% /responsive-table %}} Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | -- | -- | - | :: | - | -- | - | | datasourceUid | string | `string` | | | | | | model | | `interface{}` | | | | | | queryType | string | `string` | | | | | | refId | string | `string` | | | | | | relativeTimeRange | | `RelativeTimeRange` | | | | | {{% /responsive-table %}} Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | | -- | | :: | - | -- | - | | annotations | map of string | `map[string]string` | | | | | | condition | string | `string` | | | | | | dashboardUid | string | `string` | | | | | | data | | `[]*AlertQueryExport` | | | | | | execErrState | string | `string` | | | | | | for | | `Duration` | | | | | | isPaused | boolean | `bool` | | | | | | labels | map of string | `map[string]string` | | | | | | noDataState | string | `string` | | | | | | panelId | int64 (formatted integer) | `int64` | | | | | | title | string | `string` | | | | | | uid | string | `string` | | | | | {{% /responsive-table %}} Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | | - | - | :: | - | -- | - | | folderUid | string | `string` | | | | | | interval | int64 (formatted integer) | `int64` | | | | | | rules | | `[]*ProvisionedAlertRule` | | | | | | title | string | `string` | | | | | {{% /responsive-table %}} Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | -- | | -- | :: | - | -- | - | | folder | string | `string` | | | | | | interval | | `Duration` | | | | | | name | string | `string` | | | | | | orgId | int64 (formatted integer) | `int64` | | | | | | rules | | `[]*AlertRuleExport` | | | | | {{% /responsive-table %}} Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | - | | -- | :: | - | -- | - | | apiVersion | int64 (formatted integer) | `int64` | | | | | | contactPoints | | `[]*ContactPointExport` | | | | | | groups | | `[]*AlertRuleGroupExport` | | | | | | policies | | `[]*NotificationPolicyExport` | | | | | {{% /responsive-table %}} Properties | Name | Type | Go type | Required | Default | Description | Example | | | | - | :: | - | -- | - | | name | string | `string` | | | | | | orgId | int64 (formatted integer) | `int64` | | | | | | receivers | | `[]*ReceiverExport` | | | | | | Name | Type | Go type | Default | Description | Example | | -- | - | - | - | -- | - | | Duration | int64 (formatted integer) | int64 | | | | EmbeddedContactPoint is the contact point type that is used by grafanas embedded alertmanager implementation. Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | | -- | -- | :: | - | -- | | | disableResolveMessage | boolean | `bool` | | | | `false` | | name | string | `string` | | | Name is used as grouping key in the UI. Contact points with the | | same name will be grouped in the UI. | `webhook_1` | | provenance | string | `string` | | | | | | settings | | `JSON` | | | | | | type | string | `string` | | | | `webhook` | | uid | string | `string` | | | UID is the unique identifier of the contact point. The UID can be | | set by the user. | `myexternalreference` | {{% /responsive-table %}} | Name | Type | Go type | Default | Description | Example | | | - | - | - | -- | - | | MatchType | int64 (formatted integer) | int64 | | | | Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | -- | | -- | :: | - | -- | - | | Name | string | `string` | | | | | | Type | | `MatchType` | | | | | | Value | string | `string` | | | | | {{% /responsive-table %}} Matchers is a slice of Matchers that is sortable, implements Stringer, and provides a Matches method to match a LabelSet against all Matchers in the slice. Note that some users of Matchers might require it to be

Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | -- | -- | -- | :: | - | -- | - | | name | string | `string` | | | | | | time_intervals | | `[]*TimeInterval` | | | | | {{% /responsive-table %}} Properties Properties Properties | Name | Type | Go type | Required | Default | Description | Example | | | - | - | :: | - | -- | - | | Policy | | `RouteExport` | | | inline | | | orgId | int64 (formatted integer) | `int64` | | | | | Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | - | - | | :: | - | -- | - | | name | string | `string` | | | | | | provenance | | `Provenance` | | | | | | template | string | `string` | | | | | {{% /responsive-table %}} Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | -- | | -- | :: | - | -- | - | | template | string | `string` | | | | | {{% /responsive-table %}} | Name | Type | Go type | Default | Description | Example | | - | | - | - | -- | - | | Provenance | string | string | | | | Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | | - | - | :: | - | -- | -- | | annotations | map of string | `map[string]string` | | | | `{"runbook_url":"https://supercoolrunbook.com/page/13"}` | | condition | string | `string` | | | | `A` | | data | | `[]*AlertQuery` | | | | `[{"datasourceUid":"expr","model":{"conditions":[{"evaluator":{"params":[0,0],"type":"gt"},"operator":{"type":"and"},"query":{"params":[]},"reducer":{"params":[],"type":"avg"},"type":"query"}],"datasource":{"type":"expr","uid":"expr"},"expression":"1 == 1","hide":false,"intervalMs":1000,"maxDataPoints":43200,"refId":"A","type":"math"},"queryType":"","refId":"A","relativeTimeRange":{"from":0,"to":0}}]` | | execErrState | string | `string` | | | | | | folderUID | string | `string` | | | | `project_x` | | for | | `Duration` | | | | | | id | int64 (formatted integer) | `int64` | | | | | | isPaused | boolean | `bool` | | | | `false` | | labels | map of string | `map[string]string` | | | | `{"team":"sre-team-1"}` | | noDataState | string | `string` | | | | | | orgID | int64 (formatted integer) | `int64` | | | | | | provenance | | `Provenance` | | | | | | ruleGroup | string | `string` | | | | `evalgroup1` | | title | string | `string` | | | | `Always firing` | | uid | string | `string` | | | | | | updated | date-time (formatted string) | `strfmt.DateTime` | | | | | {{% /responsive-table %}} Properties | Name | Type | Go type | Required | Default | Description | Example | | | -- | | :: | - | -- | - | | disableResolveMessage | boolean | `bool` | | | | | | settings | | `RawMessage` | | | | | | type | string | `string` | | | | | | uid | string | `string` | | | | | A Regexp is safe for concurrent use by multiple goroutines, except for configuration methods, such as Longest. RelativeTimeRange is the per query start and end time for requests. Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | - | | - | :: | - | -- | - | | from | | `Duration` | | | | | | to | | `Duration` | | | | | {{% /responsive-table %}} A Route is a node that contains definitions of how to handle alerts. This is modified from the upstream alertmanager in that it adds the ObjectMatchers

Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | - | - | - | :: | - | | - | | continue | boolean | `bool` | | | | | | group_by | []string | `[]string` | | | | | | group_interval | string | `string` | | | | | | group_wait | string | `string` | | | | | | match | map of string | `map[string]string` | | | Deprecated. Remove before v1.0 release. | | | match_re | | `MatchRegexps` | | | | | | matchers | | `Matchers` | | | | | | mutetimeintervals | []string | `[]string` | | | | | | object_matchers | | `ObjectMatchers` | | | | | | provenance | | `Provenance` | | | | | | receiver | string | `string` | | | | | | repeat_interval | string | `string` | | | | | | routes | | `[]*Route` | | | | | {{% /responsive-table %}} RouteExport is the provisioned file export of definitions.Route. This is needed to hide fields that aren't usable in provisioning file format. An alternative would be to define a custom MarshalJSON and MarshalYAML that excludes them. Properties | Name | Type | Go type | Required | Default | Description | Example | | - | - | - | :: | - | | - | | continue | boolean | `bool` | | | | | | group_by | []string | `[]string` | | | | | | group_interval | string | `string` | | | | | | group_wait | string | `string` | | | | | | match | map of string | `map[string]string` | | | Deprecated. Remove before v1.0 release. | | | match_re | | `MatchRegexps` | | | | | | matchers | | `Matchers` | | | | | | mutetimeintervals | []string | `[]string` | | | | | | object_matchers | | `ObjectMatchers` | | | | | | receiver | string | `string` | | | | | | repeat_interval | string | `string` | | | | | | routes | | `[]*RouteExport` | | | | | TimeInterval describes intervals of time. ContainsTime will tell you if a golang time is contained within the interval. Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | - | -- | -- | :: | - | -- | - | | daysofmonth | []string | `[]string` | | | | | | location | string | `string` | | | | | | months | []string | `[]string` | | | | | | times | | `[]*TimeRange` | | | | | | weekdays | []string | `[]string` | | | | | | years | []string | `[]string` | | | | | {{% /responsive-table %}} For example, 4:00PM to End of the day would Begin at 1020 and End at 1440. Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default | Description | Example | | -- | - | - | :: | - | -- | - | | EndMinute | int64 (formatted integer) | `int64` | | | | | | StartMinute | int64 (formatted integer) | `int64` | | | | | {{% /responsive-table %}} Properties {{% responsive-table %}} | Name | Type | Go type | Required | Default |