Grafana OnCall organizations HTTP API
The organizations API exposes the current Grafana IRM organization (always a single org for the authenticated token). Use the id value returned by list or get as <ORGANIZATION_ID> in the path. It is the OnCall organization public ID, not your Grafana stack ID.
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",
"manually_manage_direct_paging_integrations": false
}HTTP request
GET {{API_URL}}/api/v1/organizations/<ORGANIZATION_ID>/
| Parameter | Unique | Description |
|---|---|---|
id | Yes | Organization ID (public primary key). |
manually_manage_direct_paging_integrations | No | When true, Grafana IRM does not automatically create or delete direct paging integrations; you manage them explicitly (for example with Terraform). When false or null, default automation applies. See Manually manage direct paging integrations. |
Update an organization
Required permission: grafana-irm-app.other-settings:write
Updates organization settings exposed by this API. You can send a full representation with PUT or only the fields to change with PATCH.
curl "{{API_URL}}/api/v1/organizations/O53AAGWFBPE5W/" \
--request PATCH \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net" \
--data '{
"manually_manage_direct_paging_integrations": true
}'The response body matches Get an organization.
HTTP request
PATCH {{API_URL}}/api/v1/organizations/<ORGANIZATION_ID>/
PUT {{API_URL}}/api/v1/organizations/<ORGANIZATION_ID>/
| Parameter | Unique | Description |
|---|---|---|
manually_manage_direct_paging_integrations | No | Writable. Set to true to take manual control of direct paging integrations (required before creating or deleting them via the API without automation). |
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",
"manually_manage_direct_paging_integrations": false
}
],
"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/
Was this page helpful?
Related resources from Grafana Labs


