Co-authored-by: Eve832 <eve.meelan@grafana.com>
Co-authored-by: Francisco Montes de Oca <nevermind89x@gmail.com>
Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Julia <ferril.darkdiver@gmail.com>
Co-authored-by: maskin25 <kengurek@gmail.com>
Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <motakuk@gmail.com>
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
Co-authored-by: Richard Hartmann <richih@richih.org>
Co-authored-by: Robby Milo <robbymilo@fastmail.com>
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
63 lines
No EOL
2.2 KiB
Markdown
63 lines
No EOL
2.2 KiB
Markdown
+++
|
|
title = "Grafana OnCall HTTP API reference"
|
|
weight = 1300
|
|
+++
|
|
|
|
# HTTP API Reference
|
|
|
|
Use the following guidelines for the Grafana OnCall API.
|
|
|
|
<!--Welcome to the Grafana OnCall API reference!
|
|
|
|
| Simplified API Structure |
|
|
| ----------- |
|
|
|  | -->
|
|
|
|
## Authentication
|
|
|
|
To authorize, use the **Authorization** header:
|
|
|
|
```shell
|
|
# With shell, you can just pass the correct header with each request
|
|
curl "api_endpoint_here" --header "Authorization: meowmeowmeow"
|
|
```
|
|
|
|
Note that `meowmeowmeow` is a valid key for test purposes.
|
|
Replace `meowmeowmeow` with your API key in production.
|
|
|
|
Grafana OnCall uses API keys to allow access to the API. You can request a new OnCall API key in the API section.
|
|
|
|
An API key is specific to a user and a Grafana stack. If you want to switch to a different team configuration, request a different API key.
|
|
|
|
## Pagination
|
|
|
|
List endpoints such as List Integrations or List Alert Groups return multiple objects.
|
|
|
|
The OnCall API returns them in pages. Note that the page size may vary.
|
|
|
|
| Parameter | Meaning |
|
|
|-----------|:-------:|
|
|
`count` | The total number of items. It can be `0` if a request does not return any data.
|
|
`next` | A link to the next page. It can be `null` if the next page does not contain any data.
|
|
`previous` | A link to the previous page. It can be `null` if the previous page does not contain any data.
|
|
`results` | The data list. Can be `[]` if a request does not return any data.
|
|
|
|
## Rate Limits
|
|
|
|
Grafana OnCall provides rate limits to ensure alert group notifications will be delivered to your Slack workspace even when some integrations produce a large number of alerts.
|
|
|
|
### Monitoring integrations Rate Limits
|
|
Rate limited response HTTP status: 429
|
|
|
|
|
|
| Scope | Amount | Time Frame |
|
|
|------------------------------|:------:|:----------:|
|
|
| Alerts from each integration | 300 | 5 minutes |
|
|
| Alerts from the whole team | 500 | 5 minutes |
|
|
|
|
## API rate limits
|
|
You can reduce or increase rate limits depending on platform status.
|
|
|
|
| Scope | Amount | Time Frame |
|
|
|--------------------------|:------:|:--------:|
|
|
| API requests per API key | 300 | 5 minutes | |