Grafana Enterprise API

These are only available in Grafana Enterprise

GitHub OpenAPI
Business capability
Identity & Access Management BC-620.20

Operations 65

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /access-control/roles List all roles · Get all roles #
Ask an LLM
“What roles exist in my organization's access control?”
“Can I see only the roles I am allowed to delegate?”
Tell an agent
List all roles.
List roles I can delegate, including hidden ones.
POST /access-control/roles Create a custom role · Create a new custom role #
Ask an LLM
“How do I create a custom role with specific permissions?”
“Can I create a role that inherits only a subset of my own permissions?”
Tell an agent
Create a role named {name} with permissions {permissions}.
Create a custom role {name} described as {description}.
GET /access-control/roles/{roleUID} Get a role · Get a role #
Ask an LLM
“What permissions does a particular role have?”
“Can I look up a role by its UID?”
Tell an agent
Get role {roleUID}.
Show the permissions of role {roleUID}.
PUT /access-control/roles/{roleUID} Update a custom role · Update a custom role #
Ask an LLM
“How do I change the permissions of an existing custom role?”
“Can I rename a custom role I created?”
Tell an agent
Update role {roleUID} to have permissions {permissions}.
Rename custom role {roleUID} to {displayName}.
DELETE /access-control/roles/{roleUID} Delete a custom role · Delete a custom role #
Ask an LLM
“How do I delete a custom role?”
“Can I force-delete a role that is still assigned to someone?”
Tell an agent destructive · confirm first
Delete role {roleUID}.
Force-delete role {roleUID} with force {force}.
GET /access-control/roles/{roleUID}/assignments List who a role is assigned to · Get role assignments #
Ask an LLM
“Which users and teams have a given role assigned?”
“Can I see role assignments for a role I didn't create?”
Tell an agent
List assignments of role {roleUID}.
Show who holds role {roleUID}.
PUT /access-control/roles/{roleUID}/assignments Replace a role's assignments · Set role assignments #
Ask an LLM
“How do I replace every user and team assigned to a role?”
“Can I assign a role to specific teams and users at once?”
Tell an agent
Assign role {roleUID} to users {users}.
Replace the assignments of role {roleUID} with teams {teams}.
GET /access-control/status Check if fine-grained access control is enabled · Get status #
Ask an LLM
“Is fine-grained access control turned on in my organization?”
“How can I confirm access control is enabled before assigning roles?”
Tell an agent
Check the access control status.
Tell me whether fine-grained access control is enabled.
POST /access-control/teams/roles/search List roles assigned to several teams · List roles assigned to multiple teams #
Ask an LLM
“Which roles are directly assigned to a set of teams?”
“Can I find roles assigned to multiple teams at once?”
Tell an agent
List roles assigned to teams {teamIds}.
Find roles assigned to teams {teamIds} in organization {orgId}.
GET /access-control/teams/{teamId}/roles List roles assigned to a team · Get team roles #
Ask an LLM
“What roles does a specific team have?”
“Can I see a team's roles in a different organization?”
Tell an agent
List roles assigned to team {teamId}.
Show team {teamId}'s roles in organization {targetOrgId}.
PUT /access-control/teams/{teamId}/roles Replace a team's roles · Update team role #
Ask an LLM
“How do I replace all roles a team currently holds?”
“Can I set a team's roles to a specific set of role UIDs?”
Tell an agent
Replace team {teamId}'s roles with {roleUids}.
Set team {teamId}'s roles to {roleUids} in organization {targetOrgId}.
POST /access-control/teams/{teamId}/roles Assign a role to a team · Add team role #
Ask an LLM
“How do I give a team an additional role?”
“Can I add a single role to a team without replacing its others?”
Tell an agent
Add role {roleUid} to team {teamId}.
Give team {teamId} the {roleUid} role.
DELETE /access-control/teams/{teamId}/roles/{roleUID} Remove a role from a team · Remove team role #
Ask an LLM
“How do I take a role away from a team?”
“Can I revoke a role from a team without touching its other roles?”
Tell an agent destructive · confirm first
Remove role {roleUID} from team {teamId}.
Revoke team {teamId}'s {roleUID} role.
POST /access-control/users/roles/search List roles assigned to several users · List roles assigned to multiple users #
Ask an LLM
“Which roles are directly assigned to a set of users?”
“Can I find roles assigned to multiple users at once?”
Tell an agent
List roles assigned to users {userIds}.
Find roles assigned to users {userIds} in organization {orgId}.
GET /access-control/users/{userId}/roles List roles assigned to a user · List roles assigned to a user #
Ask an LLM
“What roles does a specific user have?”
“Can I see a user's roles in a different organization?”
Tell an agent
List roles assigned to user {userId}.
Show user {userId}'s roles in organization {targetOrgId}.
PUT /access-control/users/{userId}/roles Replace a user's roles · Set user role assignments #
Ask an LLM
“How do I replace all roles a user currently holds?”
“Can I set a user's roles to a specific set of role UIDs?”
Tell an agent
Replace user {userId}'s roles with {roleUids}.
Set user {userId}'s roles to {roleUids} in organization {targetOrgId}.
POST /access-control/users/{userId}/roles Assign a role to a user · Add a user role assignment #
Ask an LLM
“How do I give a user an additional role?”
“Can I add a single role to a user without replacing their other roles?”
Tell an agent
Add role {roleUid} to user {userId}.
Give user {userId} the {roleUid} role.
DELETE /access-control/users/{userId}/roles/{roleUID} Remove a role from a user · Remove a user role assignment #
Ask an LLM
“How do I take a role away from a user?”
“Can I revoke a role from a user without touching their other roles?”
Tell an agent destructive · confirm first
Remove role {roleUID} from user {userId}.
Revoke user {userId}'s {roleUID} role.
GET /admin/ldap-sync-status Check the LDAP sync status · Returns the current state of the LDAP background sync integration #
Ask an LLM
“Is the LDAP background sync currently running?”
“What state is the LDAP sync integration in?”
Tell an agent
Get the LDAP sync status.
Tell me whether LDAP sync is active.
POST /admin/provisioning/access-control/reload Reload the access control configuration · You need to have a permission with action `provisioning:reload` with scope… #
Ask an LLM
“How do I reload the access control configuration after a change?”
“Can an admin force a reload of the access control setup?”
Tell an agent
Reload the access control configuration.
Force a reload of the access control setup.
GET /datasources/uid/{uid}/lbac/teams List a data source's team LBAC rules · Retrieves LBAC rules for a team #
Ask an LLM
“Which teams have LBAC rules on this data source?”
“Can I see the team-level access rules for a data source?”
Tell an agent
List the team LBAC rules for data source {uid}.
Show which teams can access data source {uid}.
PUT /datasources/uid/{uid}/lbac/teams Update a data source's team LBAC rules · Updates LBAC rules for a team #
Ask an LLM
“How do I change which teams can access a data source?”
“Can I update the team-level access rules on a data source?”
Tell an agent
Update the team LBAC rules for data source {uid} to {rules}.
Set team access on data source {uid} to {rules}.
GET /datasources/{dataSourceUID}/cache Get a data source's cache settings · Get data source cache config #
Ask an LLM
“Is query caching enabled on a data source?”
“What TTL settings does a data source use for cached queries and resources?”
Tell an agent
Get the cache config for data source {dataSourceUID}.
Show the query and resource TTLs for data source {dataSourceUID}.
POST /datasources/{dataSourceUID}/cache Set a data source's cache settings · Set data source cache config #
Ask an LLM
“How do I turn on query caching for a data source?”
“Can I set a custom TTL for a data source's cached queries?”
Tell an agent
Set caching on data source {dataSourceUID} with TTL {ttlQueriesMs} ms for queries.
Enable caching on data source {dataSourceUID} using default TTL {useDefaultTTL}.
POST /datasources/{dataSourceUID}/cache/clean Clear a data source's cache · Clean data source cache #
Ask an LLM
“How do I flush the cached results of a data source?”
“Can I clear a data source's query cache?”
Tell an agent destructive · confirm first
Clean the cache of data source {dataSourceUID}.
Clear all cached results for data source {dataSourceUID}.
POST /datasources/{dataSourceUID}/cache/disable Disable a data source's cache · Disable data source cache #
Ask an LLM
“How do I turn off query caching for a data source?”
“Can I disable caching on a data source?”
Tell an agent destructive · confirm first
Disable caching on data source {dataSourceUID}.
Turn off query caching for data source {dataSourceUID}.
POST /datasources/{dataSourceUID}/cache/enable Enable query caching on a data source · Enable data source cache #
Ask an LLM
“How do I turn on caching for a single data source?”
“Can I enable data source query cache for one type only?”
Tell an agent
Enable the cache on data source {dataSource}.
Turn on data source query caching for {dataSource} of type {type}.
GET /licensing/check Check license availability · Check license availability #
Ask an LLM
“Is a Grafana Enterprise license available?”
“Can I check the license status before adding users?”
Tell an agent
Check license availability.
Tell me whether a license is available.
GET /licensing/custom-permissions Get the custom permissions report (deprecated) · Get custom permissions report #
Ask an LLM
“Can I still get the custom permissions report?”
“Is there a replacement for the custom permissions report endpoint?”
Tell an agent
Get the custom permissions report.
Show the custom permissions report.
GET /licensing/custom-permissions-csv Get the custom permissions report as CSV (deprecated) · Get custom permissions report in CSV format #
Ask an LLM
“Can I download the custom permissions report as CSV?”
“Is the CSV version of the custom permissions report still supported?”
Tell an agent
Get the custom permissions report as CSV.
Export the custom permissions report to CSV.
GET /licensing/refresh-stats Refresh license stats · Refresh license stats #
Ask an LLM
“How do I refresh the license statistics?”
“Can I force a license stats refresh?”
Tell an agent
Refresh license stats.
Force a refresh of the license statistics.
GET /licensing/token Get the license token · Get license token #
Ask an LLM
“Where can I read the current license token?”
“What license token is stored in the database?”
Tell an agent
Get the license token.
Show the stored license token.
POST /licensing/token Create a license token · Create license token #
Ask an LLM
“How do I add a new license token?”
“Can I create a license token for a specific instance?”
Tell an agent
Create a license token for instance {instance}.
Add a new license token to the database.
DELETE /licensing/token Remove the stored license · Remove license from database #
Ask an LLM
“How do I remove the license stored in the database?”
“Can I delete the license token from the database?”
Tell an agent destructive · confirm first
Remove the stored license.
Delete the license token from the database for instance {instance}.
POST /licensing/token/renew Manually refresh the license token · Manually force license refresh #
Ask an LLM
“How do I force the license issuer to issue a new token?”
“Can I manually refresh the license token?”
Tell an agent
Manually refresh the license token.
Ask the license issuer for a new token.
GET /logout/saml Start a SAML single logout · GetLogout initiates single logout process #
Ask an LLM
“How do I log out a user from SAML?”
“Can I initiate a SAML single logout?”
Tell an agent
Start a SAML single logout.
Log me out of SAML.
GET /recording-rules List recording rules · Lists all rules in the database: active or deleted #
Ask an LLM
“Which recording rules are in the database?”
“Can I see both active and deleted recording rules?”
Tell an agent
List all recording rules.
Show every recording rule in the database.
PUT /recording-rules Update a recording rule · Update the active status of a rule #
Ask an LLM
“How do I change the active status of a recording rule?”
“Can I edit an existing recording rule?”
Tell an agent
Set recording rule {id} active to {active}.
Update recording rule {id} with queries {queries}.
POST /recording-rules Create a recording rule · Create a recording rule that is then registered and started #
Ask an LLM
“How do I create a new recording rule?”
“Can I register and start a recording rule?”
Tell an agent
Create recording rule {name} with queries {queries}.
Register and start a new recording rule {name}.
POST /recording-rules/test Test a recording rule · Test a recording rule #
Ask an LLM
“How do I test a recording rule before creating it?”
“Can I run a dry test of a recording rule?”
Tell an agent
Test recording rule {name} with queries {queries}.
Dry-run recording rule {name} to check its queries.
GET /recording-rules/writer Get the Prometheus remote write target for recording rules · Return the prometheus remote write target #
Ask an LLM
“Which Prometheus remote write target is configured for recording rules?”
“Can I check the recording rule write target before setting up a rule?”
Tell an agent
Show the recording rule remote write target.
Get the Prometheus remote write target for recording rules.
POST /recording-rules/writer Create a Prometheus remote write target for recording rules · Create a remote write target #
Ask an LLM
“How do I configure a Prometheus remote write target for recording rules?”
“What happens if no Prometheus data source is configured when I create a recording rule target?”
Tell an agent
Create a recording rule remote write target for Prometheus data source {data_source_uid}.
Set up a new Prometheus remote write target for recording rules.
DELETE /recording-rules/writer Remove the Prometheus remote write target · Delete the remote write target #
Ask an LLM
“How do I stop Prometheus remote write for recording rules?”
“Can I clear the remote write target for recording rules?”
Tell an agent destructive · confirm first
Delete the recording rule remote write target.
Clear the Prometheus remote write configuration for recording rules.
DELETE /recording-rules/{recordingRuleID} Delete a recording rule · Delete removes the rule from the registry and stops it #
Ask an LLM
“How do I remove a recording rule from the registry?”
“Does deleting a recording rule stop it from running?”
Tell an agent destructive · confirm first
Delete recording rule {recordingRuleID}.
Remove the recording rule {recordingRuleID} from the registry and stop it.
GET /reports List scheduled reports · List reports #
Ask an LLM
“Which scheduled reports exist in my organization?”
“Can I see all reports, even expired ones?”
Tell an agent
List my organization's scheduled reports.
Show every report configured for our organization.
POST /reports Create a scheduled report · Create a report #
Ask an LLM
“How do I schedule a report to be emailed to recipients?”
“Can I include CSV and dashboard URLs in a scheduled report?”
Tell an agent
Create a report named {name} scheduled {schedule} with recipients {recipients}.
Schedule a report of dashboards {dashboards} to recipients {recipients} at {schedule}.
GET /reports/dashboards/{uid} List reports for a dashboard · List reports by dashboard uid #
Ask an LLM
“Which reports are scheduled for a particular dashboard?”
“Can I see all reports tied to one dashboard UID?”
Tell an agent
List reports for dashboard {uid}.
Show every scheduled report that includes dashboard {uid}.
POST /reports/email Generate and send a report by email · Send a report #
Ask an LLM
“How do I generate and email a report right now?”
“Does sending a report wait until it is generated?”
Tell an agent
Send report {id} to {emails}.
Generate and email report {id} to the recipients listed in the report.
GET /reports/images/:image Get the custom branding image for reports · Get custom branding report image #
Ask an LLM
“Where can I fetch the custom branding image used in reports?”
“What image does Grafana use for report branding?”
Tell an agent
Get the custom branding report image.
Show the report branding image.
GET /reports/render/csvs Download a CSV report for dashboards · Download a CSV report #
Ask an LLM
“Can I download a CSV of dashboard data for a report?”
“Is there a way to get report CSVs for specific dashboards?”
Tell an agent
Download CSV report for dashboards {dashboards}.
Export a CSV of the report titled {title}.
GET /reports/render/pdfs Render a PDF report for dashboards · Render report for multiple dashboards #
Ask an LLM
“Can I generate a PDF report of several dashboards?”
“Is it possible to render a report PDF in landscape orientation?”
Tell an agent
Render a PDF report of dashboards {dashboards}.
Generate a {orientation} PDF report of dashboards {dashboards}.
GET /reports/settings Get report settings · Get report settings #
Ask an LLM
“What are the current report settings for my organization?”
“Can I see the branding and PDF settings used for reports?”
Tell an agent
Show the current report settings.
Get the report branding and PDF settings.
POST /reports/settings Save report settings · Save settings #
Ask an LLM
“How do I change the report branding or PDF theme?”
“Can I turn on dashboard titles in PDF reports?”
Tell an agent
Save report settings with branding {branding} and PDF theme {pdfTheme}.
Update the report settings so dashboard titles are {pdfDashboardTitleEnabled} in PDFs.
POST /reports/test-email Send a test report by email · Send test report via email #
Ask an LLM
“How do I send a test report to check the email settings?”
“Can I send a test report to specific recipients?”
Tell an agent
Send a test report to {recipients}.
Email a test report of dashboards {dashboards} to {recipients}.
GET /reports/{id} Get a scheduled report · Get a report #
Ask an LLM
“How do I view one scheduled report by its ID?”
“Can I fetch a report's settings using its internal ID?”
Tell an agent
Get report {id}.
Show the scheduled report {id}.
PUT /reports/{id} Update a scheduled report · Update a report #
Ask an LLM
“How do I change the schedule or recipients of an existing report?”
“Can I pause or resume a scheduled report?”
Tell an agent
Update report {id} to schedule {schedule}.
Change the recipients of report {id} to {recipients}.
DELETE /reports/{id} Delete a scheduled report · Delete a report #
Ask an LLM
“How do I delete a scheduled report?”
“Can I remove a report by its ID?”
Tell an agent destructive · confirm first
Delete report {id}.
Remove the scheduled report {id}.
POST /saml/acs Complete a SAML login assertion · It performs Assertion Consumer Service (ACS) #
Ask an LLM
“What does the SAML assertion consumer service do after a login?”
“Where does the SAML response go after I sign in?”
Tell an agent
Send the SAML assertion to the assertion consumer service.
Complete the SAML login with RelayState {RelayState}.
GET /saml/metadata Get the SAML service provider metadata · It exposes the SP (Grafana's) metadata for the IdP's consumption #
Ask an LLM
“Where do I get the SAML metadata for my service provider?”
“What SP metadata does Grafana expose for my identity provider?”
Tell an agent
Get the SAML service provider metadata.
Show the SP metadata for SAML.
GET /saml/slo Complete a SAML single logout callback · It performs Single Logout (SLO) callback #
Ask an LLM
“What happens when a SAML single logout request comes in?”
“Can I handle both logout responses and requests in one callback?”
Tell an agent
Handle the SAML single logout callback.
Process the SAML logout request or response.
POST /saml/slo Handle a SAML single logout callback · It performs Single Logout (SLO) callback #
Ask an LLM
“What happens when the identity provider sends a logout response back to Grafana?”
“Can I process an IdP-initiated SLO request through the SAML logout callback?”
Tell an agent
Process the SAML logout response {SAMLResponse}.
Handle the SAML logout request {SAMLRequest} from the identity provider.
GET /teams/{teamId}/groups List external groups linked to a team · Get External Groups #
Ask an LLM
“Which external groups are linked to a team?”
“How do I see the group mappings on a team?”
Tell an agent
List the external groups for team {teamId}.
Show which external groups team {teamId} is mapped to.
POST /teams/{teamId}/groups Link an external group to a team · Add External Group #
Ask an LLM
“How do I map an external group to a team?”
“Can I add an external group ID to a team?”
Tell an agent
Add external group {groupId} to team {teamId}.
Link external group {groupId} to team {teamId}.
DELETE /teams/{teamId}/groups Unlink an external group from a team · Remove External Group #
Ask an LLM
“How do I unlink an external group from a team?”
“Can I remove one external group ID from a team?”
Tell an agent destructive · confirm first
Remove external group {groupId} from team {teamId}.
Unlink external group {groupId} from team {teamId}.
GET /teams/{teamId}/groups/search Search external groups on a team · Search for team groups with optional filtering and pagination #
Ask an LLM
“Which external groups on a team match a name?”
“Can I filter a team's external groups by name?”
Tell an agent
Search external groups on team {teamId} for {query}.
Find external groups on team {teamId} named {name}.

Documentation

📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/
📖
Authentication
https://grafana.com/docs/grafana/latest/developers/http_api/authentication/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_versions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_public/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder_dashboard_search/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/data_source/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/datasource_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/datasource_lbac_rules/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/annotations/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/org/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/user/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/team/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/team_sync/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/preferences/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/access_control/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/sso-settings/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/admin/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/licensing/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/reporting/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/query_and_resource_caching/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/library_element/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/correlations/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/snapshot/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/short_url/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/query_history/

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/grafana-com:grafana-com-enterprise-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

grafana-com-enterprise-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'The Grafana backend exposes an HTTP API, the same API is used by the frontend to do

    everything from saving dashboards, creating users and updating data sources.'
  title: Grafana HTTP API. Enterprise API
  contact:
    name: Grafana Labs
    url: https://grafana.com
    email: hello@grafana.com
  version: 0.0.1
servers:
- url: /api
security:
- basic: []
- api_key: []
tags:


# --- truncated at 32 KB (77 KB total) ---
# Full source: https://artifacts.apis.io/grafana-com/openapi/grafana-com-enterprise-api-openapi.yml