mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:32:13 +08:00
fixes following first code review
This commit is contained in:
@ -49,17 +49,17 @@ Content-Type: application/json
|
||||
```
|
||||
|
||||
## Get one alert
|
||||
|
||||
`GET /api/alerts/:id`
|
||||
|
||||
`GET /api/alerts/:id`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
|
||||
```http
|
||||
GET /api/alerts/1 HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
@ -83,37 +83,27 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
POST /api/alerts/1/pause HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
The :id query parameter is the id of the alert to be paused or unpaused.
|
||||
|
||||
JSON Body Schema:
|
||||
|
||||
- **paused** – Can be `true` or `false`. True to pause an alert. False to unpause an alert.
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
{
|
||||
```
|
||||
|
||||
## Pause all alerts
|
||||
|
||||
`POST /api/admin/pause-all-alerts`
|
||||
|
||||
```http
|
||||
POST /api/admin/pause-all-alerts HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
POST /api/alerts/1/pause HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
The :id query parameter is the id of the alert to be paused or unpaused.
|
||||
|
||||
JSON Body Schema:
|
||||
|
||||
- **paused** – Can be `true` or `false`. True to pause an alert. False to unpause an alert.
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
{
|
||||
```
|
||||
|
||||
## Pause all alerts
|
||||
|
||||
`POST /api/admin/pause-all-alerts`
|
||||
|
Reference in New Issue
Block a user