oncall-engine/docs/sources/oncall-api-reference/user_groups.md
Joey Orlando c08eeb72a3
add precommit rules for markdown/json files (#915)
* add markdownlint precommit steps + fix existing errors

* prettier json linting
2022-12-01 14:26:54 +01:00

1.5 KiB

aliases canonical title weight
/docs/oncall/latest/oncall-api-reference/user_groups/
https://grafana.com/docs/oncall/latest/oncall-api-reference/user_groups/ OnCall User Groups HTTP API 1400

List user groups

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:

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "GPFAPH7J7BKJB",
      "type": "slack_based",
      "slack": {
        "id": "MEOW_SLACK_ID",
        "name": "Meow Group",
        "handle": "meow_group"
      }
    }
  ]
}
Parameter Unique Description
id Yes User Group ID
type No Slack-defined user groups
slack No Metadata retrieved from Slack.

HTTP request

GET {{API_URL}}/api/v1/user_groups/