If a page is removed in a future version, the presence of a "latest" absolute alias in a previous version can redirect that removed page. **Notes for reviewer:** I would like to make similar changes for older, previously published versions. I believe you are only publishing documentation on specific tag events and are not maintaining long lived release branches for backporting fixes into. If my understanding is correct, I will make the changes in the website repository (https://github.com/grafana/website/tree/master/content/docs/oncall). Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
51 lines
1.5 KiB
Markdown
51 lines
1.5 KiB
Markdown
---
|
|
canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/user_groups/
|
|
title: OnCall User Groups HTTP API
|
|
weight: 1400
|
|
---
|
|
|
|
<!--Used in escalation policies with type = `notify_user_group` and in schedules.-->
|
|
|
|
# List user groups
|
|
|
|
```shell
|
|
curl "{{API_URL}}/api/v1/user_groups/" \
|
|
--request GET \
|
|
--header "Authorization: meowmeowmeow" \
|
|
--header "Content-Type: application/json"
|
|
```
|
|
|
|
The above command returns JSON structured in the following way:
|
|
|
|
```json
|
|
{
|
|
"count": 1,
|
|
"next": null,
|
|
"previous": null,
|
|
"results": [
|
|
{
|
|
"id": "GPFAPH7J7BKJB",
|
|
"type": "slack_based",
|
|
"slack": {
|
|
"id": "MEOW_SLACK_ID",
|
|
"name": "Meow Group",
|
|
"handle": "meow_group"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
<!-- markdownlint-disable MD013 -->
|
|
|
|
| Parameter | Unique | Description |
|
|
| --------- | :----: | :---------------------------------------------------------------------------------------------------- |
|
|
| `id` | Yes | User Group ID |
|
|
| `type` | No | [Slack-defined user groups](https://slack.com/intl/en-ru/help/articles/212906697-Create-a-user-group) |
|
|
| `slack` | No | Metadata retrieved from Slack. |
|
|
|
|
<!-- markdownlint-enable MD013 -->
|
|
|
|
**HTTP request**
|
|
|
|
`GET {{API_URL}}/api/v1/user_groups/`
|