{ "opencollection": "1.0.0", "info": { "name": "Grafana HTTP Access Role API", "version": "11.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Role", "type": "folder" }, "items": [ { "info": { "name": "Grafana Create Role", "type": "http" }, "http": { "method": "POST", "url": "https://{instance}.grafana.net/api/access-control/roles", "body": { "type": "json", "data": "{}" } }, "docs": "Creates a new custom role in Grafana's role-based access control (RBAC) system. This endpoint allows administrators to define granular permissions by creating roles with specific sets of permissions that can be assigned to users, teams, or service accounts. The request requires specifying the role name, display name, description, and optionally a set of permissions that define what actions the role can perform within Grafana. Custom roles enable organizations to implement fine-grained access con" }, { "info": { "name": "Grafana Get Role", "type": "http" }, "http": { "method": "GET", "url": "https://{instance}.grafana.net/api/access-control/roles/:roleUID", "params": [ { "name": "roleUID", "value": "", "type": "path" } ] }, "docs": "This API operation retrieves detailed information about a specific role in Grafana's access control system by providing the role's unique identifier (roleUID) in the URL path. When called with a GET request, it returns the complete role definition including the role's name, description, version, permissions, and any other associated metadata. This endpoint is useful for administrators who need to inspect role configurations, audit permissions, or retrieve role details before performing updates o" }, { "info": { "name": "Grafana Update Role", "type": "http" }, "http": { "method": "PUT", "url": "https://{instance}.grafana.net/api/access-control/roles/:roleUID", "params": [ { "name": "roleUID", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "This API operation updates an existing role in Grafana's access control system by sending a PUT request to the endpoint with the role's unique identifier (roleUID) in the path. It allows administrators to modify role properties such as the role name, description, permissions, and other attributes associated with that specific role. The request requires the roleUID parameter to identify which role to update, and the request body contains the updated role configuration. This operation is typically" }, { "info": { "name": "Grafana Delete Role", "type": "http" }, "http": { "method": "DELETE", "url": "https://{instance}.grafana.net/api/access-control/roles/:roleUID", "params": [ { "name": "force", "value": "", "type": "query" }, { "name": "global", "value": "", "type": "query" }, { "name": "roleUID", "value": "", "type": "path" } ] }, "docs": "Removes a custom role from Grafana's access control system by specifying its unique identifier (roleUID). This operation permanently deletes the role definition along with all its associated permissions and assignments to users or teams. Only custom roles can be deleted through this endpoint, as built-in system roles are protected from deletion. The operation requires appropriate administrative permissions and will fail if the specified roleUID does not exist or references a non-deletable system" }, { "info": { "name": "Grafana Get Role Assignments", "type": "http" }, "http": { "method": "GET", "url": "https://{instance}.grafana.net/api/access-control/roles/:roleUID/assignments", "params": [ { "name": "roleUID", "value": "", "type": "path" } ] }, "docs": "This API operation retrieves all current assignments for a specific role in Grafana's access control system by providing the role's unique identifier (roleUID) in the endpoint path. When called with a GET request, it returns a list of users, teams, or service accounts that have been assigned the specified role, allowing administrators to audit and review who has been granted particular permissions within their Grafana instance. This is useful for security audits, compliance checks, and understan" }, { "info": { "name": "Grafana Set Role Assignments", "type": "http" }, "http": { "method": "PUT", "url": "https://{instance}.grafana.net/api/access-control/roles/:roleUID/assignments", "params": [ { "name": "roleUID", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates the complete set of role assignments for a specific role identified by its UID in Grafana's access control system. This operation replaces all existing assignments with the new set provided in the request body, allowing administrators to define which users, teams, or service accounts are assigned to the role. The request requires the role's unique identifier in the URL path and accepts a payload containing the new assignments, typically including user IDs, team IDs, or service account ID" }, { "info": { "name": "Grafana Add Team Role", "type": "http" }, "http": { "method": "POST", "url": "https://{instance}.grafana.net/api/access-control/teams/:teamId/roles", "params": [ { "name": "teamId", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "This API operation adds a role to a specific team in Grafana's access control system. It uses a POST request to the endpoint /access-control/teams/{teamId}/roles, where {teamId} is the unique identifier of the team receiving the new role assignment. The operation allows administrators to grant specific permissions and access levels to an entire team by associating a role with that team, streamlining permission management across multiple users who belong to the same team." }, { "info": { "name": "Grafana Remove Team Role", "type": "http" }, "http": { "method": "DELETE", "url": "https://{instance}.grafana.net/api/access-control/teams/:teamId/roles/:roleUID", "params": [ { "name": "roleUID", "value": "", "type": "path" }, { "name": "teamId", "value": "", "type": "path" } ] }, "docs": "This API operation removes a specific role assignment from a team in Grafana's access control system. It uses a DELETE request to the endpoint /access-control/teams/{teamId}/roles/{roleUID}, where teamId identifies the target team and roleUID specifies the role to be removed. When executed, it revokes the specified role's permissions from the team, effectively removing that role's access rights from all members of that team without affecting other role assignments the team may have." }, { "info": { "name": "Grafana Add User Role", "type": "http" }, "http": { "method": "POST", "url": "https://{instance}.grafana.net/api/access-control/users/:userId/roles", "params": [ { "name": "userId", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "This API operation adds a role to a specific user in Grafana's access control system by sending a POST request to the endpoint /access-control/users/{userId}/roles, where {userId} is replaced with the target user's identifier. The operation allows administrators to grant additional permissions and access rights to users by assigning them predefined or custom roles within the Grafana instance. This is typically used for managing user permissions and implementing role-based access control (RBAC) t" }, { "info": { "name": "Grafana Remove User Role", "type": "http" }, "http": { "method": "DELETE", "url": "https://{instance}.grafana.net/api/access-control/users/:userId/roles/:roleUID", "params": [ { "name": "global", "value": "", "type": "query", "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment." }, { "name": "roleUID", "value": "", "type": "path" }, { "name": "userId", "value": "", "type": "path" } ] }, "docs": "Removes a specific role assignment from a user in Grafana's access control system. This API endpoint deletes the association between a user (identified by userId) and a particular role (identified by roleUID), effectively revoking the permissions granted by that role from the user. The operation requires appropriate administrative privileges and is typically used when managing user permissions, reorganizing team structures, or removing access rights that are no longer needed. Upon successful exe" }, { "info": { "name": "Grafana Set Resource Permissions For Built In Role", "type": "http" }, "http": { "method": "POST", "url": "https://{instance}.grafana.net/api/access-control/:resource/:resourceID/builtInRoles/:builtInRole", "params": [ { "name": "resource", "value": "", "type": "path" }, { "name": "resourceID", "value": "", "type": "path" }, { "name": "builtInRole", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "This API operation allows administrators to configure and assign specific resource-level permissions to a built-in role within Grafana's access control system. By making a POST request to this endpoint with a specified resource type, resource ID, and built-in role identifier, you can define granular permissions that determine what actions the built-in role can perform on that particular resource. This is useful for customizing access control policies beyond default settings, enabling fine-graine" } ] } ], "bundled": true }