Grafana OnCall organizations HTTP API
Get an organization
Required permission: grafana-irm-app.other-settings:read
This endpoint retrieves the organization object.
curl "{{API_URL}}/api/v1/organizations/O53AAGWFBPE5W/" \
--request GET \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net"
The above command returns JSON structured in the following way:
{
"id": "O53AAGWFBPE5W",
"is_personal_webhook_integration_enabled": true,
"is_slack_integration_enabled": true,
"is_ms_teams_integration_enabled": true,
"is_telegram_integration_enabled": true
}
HTTP request
GET {{API_URL}}/api/v1/organizations/<ORGANIZATION_ID>/
Parameter | Unique | Description |
---|---|---|
id | Yes | Organization ID |
is_personal_webhook_integration_enabled | No | Boolean flag that controls whether personal webhooks can be used by users in this organization (defaults to true) |
is_slack_integration_enabled | No | Boolean flag that controls whether Slack integration is enabled for this organization (defaults to true) |
is_ms_teams_integration_enabled | No | Boolean flag that controls whether Microsoft Teams integration is enabled for this organization (defaults to true) |
is_telegram_integration_enabled | No | Boolean flag that controls whether Telegram integration is enabled for this organization (defaults to true) |
List Organizations
Required permission: grafana-irm-app.other-settings:read
curl "{{API_URL}}/api/v1/organizations/" \
--request GET \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net"
The above command returns JSON structured in the following way:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "O53AAGWFBPE5W",
"is_personal_webhook_integration_enabled": true,
"is_slack_integration_enabled": true,
"is_ms_teams_integration_enabled": true,
"is_telegram_integration_enabled": true
}
],
"page_size": 25,
"current_page_number": 1,
"total_pages": 1
}
Note
The response is paginated. You may need to make multiple requests to get all records.
HTTP request
GET {{API_URL}}/api/v1/organizations/