# What this PR does **Before**  **After** <img width="295" alt="Screenshot 2024-08-15 at 15 20 41" src="https://github.com/user-attachments/assets/6cfef429-fde6-4b0d-81af-f59e97adaaaa">
1.2 KiB
1.2 KiB
| canonical | title | weight | refs | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| https://grafana.com/docs/oncall/latest/oncall-api-reference/slack_channels/ | Slack channels HTTP API | 0 |
|
Slack channels HTTP API
List Slack Channels
curl "{{API_URL}}/api/v1/slack_channels/" \
--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": [
{
"name": "meow_channel",
"slack_id": "MEOW_SLACK_ID"
}
],
"current_page_number": 1,
"page_size": 50,
"total_pages": 1
}
Note
: The response is paginated. 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
HTTP Request
GET {{API_URL}}/api/v1/slack_channels/