Public API docs: add note on pagination (#4795)

Fixes https://github.com/grafana/oncall-private/issues/2852
This commit is contained in:
Vadim Stepanov 2024-08-09 15:24:24 +01:00 committed by GitHub
parent a332011f1e
commit f38eff9fcf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 121 additions and 1 deletions

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/alertgroups/
title: Alert groups HTTP API
weight: 400
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Alert groups HTTP API
@ -48,6 +54,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
These available filter parameters should be provided as `GET` arguments:
- `id`

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/alerts/
title: Alerts HTTP API
weight: 100
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Alerts HTTP API
@ -105,6 +111,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameters should be provided as `GET` arguments:
- `id`

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_chains/
title: Escalation chains HTTP API
weight: 200
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Escalation chains HTTP API
@ -89,6 +95,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
**HTTP request**
`GET {{API_URL}}/api/v1/escalation_chains/`

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_policies/
title: Escalation policies HTTP API
weight: 300
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Escalation policies HTTP API
@ -144,6 +150,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameter should be provided as a `GET` argument:
- `escalation_chain_id`

View file

@ -8,6 +8,11 @@ refs:
destination: /docs/oncall/<ONCALL_VERSION>/configure/integrations/references/alertmanager/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/configure/integrations/references/alertmanager/
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Integrations HTTP API
@ -233,6 +238,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
**HTTP request**
`GET {{API_URL}}/api/v1/integrations/`

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/on_call_shifts/
title: OnCall shifts HTTP API
weight: 600
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# OnCall shifts HTTP API
@ -150,6 +156,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameters should be provided as `GET` arguments:
- `name` (Exact match)

View file

@ -13,6 +13,11 @@ refs:
destination: /docs/oncall/<ONCALL_VERSION>/configure/integrations/outgoing-webhooks/#event-types
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/configure/integrations/outgoing-webhooks/#event-types
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Outgoing webhooks
@ -66,6 +71,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
## Get webhook
```shell
@ -244,3 +251,5 @@ The above command returns JSON structured in the following way:
"total_pages": 1
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/
title: Personal notification rules HTTP API
weight: 800
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Personal notification rules HTTP API
@ -122,6 +128,8 @@ The above command returns JSON structured in the following ways:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameters should be provided as `GET` arguments:
- `user_id`

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/resolution_notes/
title: Resolution notes HTTP API
weight: 900
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Resolution notes HTTP API
@ -99,6 +105,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameter should be provided as a `GET` argument:
- `alert_group_id`

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/routes/
title: Routes HTTP API
weight: 1100
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Routes HTTP API
@ -134,6 +140,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameters should be provided as `GET` arguments:
- `integration_id`

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/schedules/
title: Schedules HTTP API
weight: 1200
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Schedules HTTP API
@ -139,6 +145,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameter should be provided as a `GET` argument:
- `name` (Exact match)
@ -307,6 +315,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
### Caveats
Some notes on the `start_date` and `end_date` query parameters:

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/shift_swaps/
title: Shift swap requests HTTP API
weight: 1200
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Shift swap requests HTTP API
@ -185,6 +191,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameters may be provided as a `GET` arguments:
- `starting_after` (an ISO 8601 timestamp string, filter requests starting after the specified datetime)

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/slack_channels/
title: Slack channels HTTP API
weight: 1300
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Slack channels HTTP API
@ -34,6 +40,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameter should be provided as a `GET` argument:
- `channel_name`

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/user_groups/
title: OnCall user groups HTTP API
weight: 1400
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
<!--Used in escalation policies with type = `notify_user_group` and in schedules.-->
@ -41,6 +47,8 @@ The above command returns JSON structured in the following way:
}
```
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
| Parameter | Unique | Description |
| --------- | :----: | :---------------------------------------------------------------------------------------------------- |
| `id` | Yes | User Group ID |

View file

@ -2,6 +2,12 @@
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/users/
title: Grafana OnCall users HTTP API
weight: 1500
refs:
pagination:
- pattern: /docs/oncall/
destination: /docs/oncall/<ONCALL_VERSION>/oncall-api-reference/#pagination
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/oncall/oncall-api-reference/#pagination
---
# Grafana OnCall users HTTP API
@ -90,7 +96,7 @@ The above command returns JSON structured in the following way:
}
```
This endpoint retrieves all users.
> **Note**: The response is [paginated](ref:pagination). You may need to make multiple requests to get all records.
The following available filter parameter should be provided as a `GET` argument: