openapi: 3.0.3 info: title: Grafana HTTP Access Groups API description: The Grafana HTTP API provides programmatic access to Grafana's core functionality including dashboards, data sources, alerts, users, organizations, folders, annotations, and teams. Authentication is handled via API keys, basic auth, or OAuth tokens passed in the Authorization header. version: 11.0.0 contact: name: Grafana Labs url: https://grafana.com license: name: AGPL-3.0 url: https://www.gnu.org/licenses/agpl-3.0.html servers: - url: https://{instance}.grafana.net/api description: Grafana Cloud variables: instance: default: your-instance - url: http://localhost:3000/api description: Local Grafana instance security: - BearerAuth: [] - BasicAuth: [] - ApiKeyAuth: [] tags: - name: Groups paths: /convert/api/prom/rules: parameters: [] post: tags: - Groups summary: Grafana Route Convert Prometheus Cortex Post Rule Groups description: This API operation converts Prometheus or Cortex rule group configurations into Grafana's native format by accepting a POST request to the /convert/api/prom/rules endpoint. It enables users to migrate their existing Prometheus-style alerting and recording rules from Prometheus or Cortex deployments into Grafana, facilitating the transition between monitoring systems while preserving rule logic and structure. The endpoint processes the submitted rule groups and transforms them into a format compatible with Grafana's alerting engine, streamlining the configuration migration process and reducing manual conversion efforts. operationId: routeConvertPrometheusCortexPostRuleGroups parameters: - name: Content-Type in: header description: '' required: true schema: const: application/json type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/api/prom/rules/{NamespaceTitle}: parameters: [] post: tags: - Groups summary: Grafana Route Convert Prometheus Cortex Post Rule Group description: The Grafana API operation POST /convert/api/prom/rules/{NamespaceTitle} converts and creates a Prometheus or Cortex rule group within a specified namespace. This endpoint accepts Prometheus-style rule definitions and transforms them into Grafana's native alert rule format, allowing users to migrate their existing Prometheus alerting and recording rules into Grafana's unified alerting system. The {NamespaceTitle} parameter identifies the target namespace where the converted rule group will be stored, enabling organized management of alert rules across different teams or services within Grafana. operationId: routeConvertPrometheusCortexPostRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: x-grafana-alerting-datasource-uid in: header description: '' schema: type: string - name: x-grafana-alerting-recording-rules-paused in: header description: '' schema: type: boolean - name: x-grafana-alerting-alert-rules-paused in: header description: '' schema: type: boolean - name: x-grafana-alerting-target-datasource-uid in: header description: '' schema: type: string - name: x-grafana-alerting-folder-uid in: header description: '' schema: type: string - name: x-grafana-alerting-notification-settings in: header description: '' schema: type: string requestBody: description: '' content: application/yaml: schema: $ref: '#/components/schemas/PrometheusRuleGroup' required: false responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/api/prom/rules/{NamespaceTitle}/{Group}: parameters: [] get: tags: - Groups summary: Grafana Route Convert Prometheus Cortex Get Rule Group description: 'This API operation retrieves a specific Prometheus rule group from a designated namespace in Grafana''s Cortex ruler service. The endpoint accepts two path parameters: NamespaceTitle which identifies the namespace containing the rule group, and Group which specifies the name of the rule group to retrieve. When called, it returns the configuration and rules defined within that particular rule group, allowing users to view and manage their Prometheus alerting and recording rules that have been converted or stored in the Cortex format within Grafana''s unified alerting system.' operationId: routeConvertPrometheusCortexGetRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '200': description: PrometheusRuleGroup headers: {} content: application/yaml: schema: contentMediaType: application/yaml '403': description: ForbiddenError headers: {} content: application/yaml: schema: contentMediaType: application/yaml '404': description: NotFound headers: {} content: application/yaml: schema: contentMediaType: application/yaml deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Groups summary: Grafana Route Convert Prometheus Cortex Delete Rule Group description: This API operation is used to delete a specific Prometheus rule group within Grafana's Cortex-based alerting system. It targets a rule group identified by both its namespace title and group name through the URL path parameters. When called with the DELETE HTTP method, it removes the entire rule group configuration from the specified namespace, effectively eliminating all alert and recording rules contained within that group from the Prometheus-compatible rules engine in Grafana. operationId: routeConvertPrometheusCortexDeleteRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/prometheus/config/v1/rules: parameters: [] post: tags: - Groups summary: Grafana Route Convert Prometheus Post Rule Groups description: This API operation converts Prometheus rule group configurations to Grafana's format via a POST request to the /convert/prometheus/config/v1/rules endpoint. It accepts Prometheus-formatted rule groups as input and transforms them into a compatible format that can be used within Grafana's alerting and recording rule system, facilitating migration or integration between Prometheus and Grafana monitoring setups. operationId: routeConvertPrometheusPostRuleGroups parameters: - name: Content-Type in: header description: '' required: true schema: const: application/json type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/prometheus/config/v1/rules/{NamespaceTitle}: parameters: [] post: tags: - Groups summary: Grafana Route Convert Prometheus Post Rule Group description: This API operation converts Prometheus rule group configurations to Grafana's native format by accepting a POST request to the endpoint /convert/prometheus/config/v1/rules/{NamespaceTitle}, where {NamespaceTitle} represents the target namespace for the rule group. It takes Prometheus-formatted alerting and recording rules as input and transforms them into Grafana-compatible rule configurations, facilitating migration or integration between Prometheus and Grafana alerting systems. The operation allows users to seamlessly transfer their existing Prometheus rule definitions into Grafana without manual reconfiguration, preserving the rule logic, labels, annotations, and evaluation intervals while adapting them to Grafana's rule management structure. operationId: routeConvertPrometheusPostRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: x-grafana-alerting-datasource-uid in: header description: '' schema: type: string - name: x-grafana-alerting-recording-rules-paused in: header description: '' schema: type: boolean - name: x-grafana-alerting-alert-rules-paused in: header description: '' schema: type: boolean - name: x-grafana-alerting-target-datasource-uid in: header description: '' schema: type: string - name: x-grafana-alerting-folder-uid in: header description: '' schema: type: string - name: x-grafana-alerting-notification-settings in: header description: '' schema: type: string requestBody: description: '' content: application/yaml: schema: $ref: '#/components/schemas/PrometheusRuleGroup' required: false responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}: parameters: [] get: tags: - Groups summary: Grafana Route Convert Prometheus Get Rule Group description: This API operation retrieves and converts a Prometheus rule group configuration from a specific namespace in Grafana. It accepts GET requests at the endpoint path that includes both the namespace title and group name as path parameters, allowing users to fetch the configuration details of a particular Prometheus alerting or recording rule group. The operation is part of Grafana's conversion utilities that help transform Prometheus-native rule configurations into Grafana's internal format or vice versa, facilitating migration and management of alerting rules across different monitoring system configurations. operationId: routeConvertPrometheusGetRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '200': description: PrometheusRuleGroup headers: {} content: application/yaml: schema: contentMediaType: application/yaml '403': description: ForbiddenError headers: {} content: application/yaml: schema: contentMediaType: application/yaml '404': description: NotFound headers: {} content: application/yaml: schema: contentMediaType: application/yaml deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Groups summary: Grafana Route Convert Prometheus Delete Rule Group description: This API operation is used to delete a Prometheus rule group from a specific namespace in Grafana's configuration. It targets a particular rule group identified by both the namespace title and group name through the URL path parameters. When invoked with a DELETE HTTP method, it removes the specified rule group configuration from the Prometheus-compatible alerting and recording rules system within Grafana, effectively cleaning up rules that are no longer needed or are being replaced. operationId: routeConvertPrometheusDeleteRuleGroup parameters: - name: NamespaceTitle in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '202': description: ConvertPrometheusResponse headers: {} content: application/json: schema: $ref: '#/components/schemas/ConvertPrometheusResponse' '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /groupsync/groups: parameters: [] get: tags: - Groups summary: Grafana Get Mapped Groups description: The Get Mapped Groups API operation retrieves a list of groups that have been configured for synchronization in Grafana's group sync functionality. This GET endpoint at /groupsync/groups returns information about groups that are mapped between an external authentication provider (such as LDAP, OAuth, or SAML) and Grafana's internal team structure, allowing administrators to view which external groups are currently being synchronized and how they correspond to teams within Grafana for access control and permission management purposes. operationId: getMappedGroups parameters: [] responses: '200': description: (empty) headers: {} content: application/json: schema: $ref: '#/components/schemas/getGroupsResponse' '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /groupsync/groups/{group_id}: parameters: [] put: tags: - Groups summary: Grafana Update Group Mappings description: This API operation updates the group mappings for a specific group in Grafana's group synchronization system. By sending a PUT request to the endpoint with a particular group ID, administrators can modify how external authentication groups (such as those from LDAP, OAuth, or SAML providers) are mapped to internal Grafana groups. This allows for dynamic management of user permissions and access control by adjusting which external groups correspond to specific Grafana organizational roles and teams. The operation requires the group ID as a path parameter and accepts a payload containing the updated mapping configuration, enabling seamless integration between external identity providers and Grafana's authorization model. operationId: updateGroupMappings parameters: - name: group_id in: path description: '' required: true schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/GroupAttributes' required: true responses: '201': description: (empty) headers: {} content: application/json: schema: $ref: '#/components/schemas/messageResponse' '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Groups summary: Grafana Create Group Mappings description: This API operation creates group mappings for a specific group in Grafana's group synchronization system. It uses a POST request to the endpoint /groupsync/groups/{group_id}, where {group_id} is a path parameter identifying the target group for which mappings should be created. The operation establishes connections between external authentication provider groups (such as LDAP, OAuth, or SAML groups) and Grafana's internal groups, enabling automated user group assignment based on their external group memberships. This functionality is essential for organizations implementing single sign-on (SSO) or centralized user management, as it allows administrators to synchronize group memberships from external identity providers to Grafana, ensuring users automatically receive appropriate permissions and access rights based on their organizational roles without manual intervention. operationId: createGroupMappings parameters: - name: group_id in: path description: '' required: true schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/GroupAttributes' required: true responses: '201': description: (empty) headers: {} content: application/json: schema: $ref: '#/components/schemas/messageResponse' '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Groups summary: Grafana Delete Group Mappings description: This API operation removes group mappings associated with a specific group in Grafana's group synchronization system. By sending a DELETE request to the endpoint with a particular group ID, administrators can eliminate the synchronization configuration that links external identity provider groups to Grafana teams or roles. This is useful when cleaning up deprecated mappings, removing access controls, or reconfiguring how external groups are mapped within Grafana's authorization structure. operationId: deleteGroupMappings parameters: - name: group_id in: path description: '' required: true schema: type: string responses: '204': description: An OKResponse is returned if the request was successful. headers: {} content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /groupsync/groups/{group_id}/roles: parameters: [] get: tags: - Groups summary: Grafana Get Group Roles description: This API operation retrieves the roles associated with a specific group in Grafana's group synchronization system. By providing a group_id in the URL path, the GET request returns information about what roles have been assigned to that particular group, which is useful for managing permissions and access control in Grafana when using external group synchronization features like LDAP or OAuth. operationId: getGroupRoles parameters: - name: group_id in: path description: '' required: true schema: type: string responses: '200': description: (empty) headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/RoleDTO' description: '' contentMediaType: application/json '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '404': description: NotFoundError is returned when the requested resource was not found. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /teams/{teamId}/groups: parameters: [] get: tags: - Groups summary: Grafana Get Team Groups Api description: This API operation retrieves the list of external groups that are synchronized with a specific team in Grafana. By providing a team ID in the path parameter, the endpoint returns all groups that have been mapped or linked to that team, which is particularly useful in environments where Grafana teams are integrated with external authentication providers like LDAP, OAuth, or SAML. This allows administrators to view and verify which external directory groups have access to a particular Grafana team, helping maintain proper access control and team membership management across integrated systems. operationId: getTeamGroupsApi parameters: - name: teamId in: path description: '' required: true schema: type: string responses: '200': description: (empty) headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/TeamGroupDTO' description: '' contentMediaType: application/json '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '404': description: NotFoundError is returned when the requested resource was not found. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true post: tags: - Groups summary: Grafana Add Team Group Api description: The Add Team Group API is a POST operation available at the endpoint /teams/{teamId}/groups in Grafana that allows administrators to associate an external authentication group with a specific Grafana team. This operation requires the teamId parameter in the URL path to identify the target team, and typically accepts a request body containing details about the group to be added, such as the group identifier from the external authentication provider (like LDAP, OAuth, or SAML). When executed successfully, this API creates a mapping between the external group and the Grafana team, enabling automatic team membership synchronization where users belonging to the specified external group are automatically added to the corresponding Grafana team upon authentication. This functionality is particularly useful for organizations that want to manage team memberships centrally through their existing identity provider rather than manually maintaining team rosters within Grafana itself. operationId: addTeamGroupApi parameters: - name: teamId in: path description: '' required: true schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/TeamGroupMapping' required: true responses: '200': description: An OKResponse is returned if the request was successful. headers: {} content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '404': description: NotFoundError is returned when the requested resource was not found. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Groups summary: Grafana Remove Team Group Api Query description: This API operation removes an external group mapping from a specified team in Grafana. When executed, it performs a DELETE request to the endpoint /teams/{teamId}/groups, where {teamId} represents the unique identifier of the team from which the group association should be removed. The operation is used to disconnect external authentication provider groups (such as LDAP, OAuth, or SAML groups) from Grafana teams, effectively revoking the automatic team membership that was granted to users belonging to those external groups. This is particularly useful when reorganizing team structures, removing obsolete group mappings, or adjusting access control policies within Grafana's role-based access control system. operationId: removeTeamGroupApiQuery parameters: - name: groupId in: query description: '' style: form explode: true schema: type: string - name: teamId in: path description: '' required: true schema: type: string responses: '200': description: An OKResponse is returned if the request was successful. headers: {} content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '404': description: NotFoundError is returned when the requested resource was not found. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /teams/{teamId}/groups/search: parameters: [] get: tags: - Groups summary: Grafana Search Team Groups description: This API operation performs a search for groups associated with a specific team in Grafana by making a GET request to the endpoint /teams/{teamId}/groups/search, where {teamId} is the unique identifier of the team whose groups you want to search. It allows administrators and authorized users to query and retrieve a list of groups that are linked to a particular team, which is useful for managing team memberships, permissions, and organizational structures within Grafana. The search functionality helps filter through potentially large numbers of groups to find specific ones related to the team, returning relevant group information that can be used for further team management operations. operationId: searchTeamGroups parameters: - name: teamId in: path description: '' required: true schema: type: integer contentEncoding: int64 - name: page in: query description: '' style: form explode: true schema: type: integer contentEncoding: int64 default: 1 - name: perpage in: query description: Number of items per page style: form explode: true schema: type: integer contentEncoding: int64 default: 1000 - name: query in: query description: If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded. style: form explode: true schema: type: string - name: name in: query description: Filter by exact name match style: form explode: true schema: type: string responses: '200': description: (empty) headers: {} content: application/json: schema: $ref: '#/components/schemas/SearchTeamGroupsQueryResult' '400': description: BadRequestError is returned when the request is invalid and it cannot be processed. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/folder/{FolderUID}/rule-groups/{Group}: parameters: [] get: tags: - Groups summary: Grafana Route Get Alert Rule Group description: This API operation retrieves a specific alert rule group within a designated folder in Grafana's provisioning system. By providing the folder's unique identifier (FolderUID) and the name of the alert rule group (Group) in the request path, users can fetch the complete configuration and details of that particular rule group. This GET endpoint is part of Grafana's provisioning API, which allows programmatic management of alerting configurations, enabling administrators and automation systems to query existing alert rule groups for monitoring, auditing, or synchronization purposes across different Grafana instances or environments. operationId: routeGetAlertRuleGroup parameters: - name: FolderUID in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '200': description: AlertRuleGroup headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertRuleGroup' '404': description: Not found. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true put: tags: - Groups summary: Grafana Route Put Alert Rule Group description: Updates an existing alert rule group identified by the folder UID and group name in Grafana's provisioning API. This PUT operation allows you to modify the configuration of alert rules within a specific rule group, including updating rule definitions, thresholds, evaluation intervals, and notification settings. The endpoint requires both the FolderUID parameter to identify the containing folder and the Group parameter to specify which alert rule group to update, with the updated configuration provided in the request body following Grafana's alert rule group schema. operationId: routePutAlertRuleGroup parameters: - name: X-Disable-Provenance in: header description: '' schema: type: string - name: FolderUID in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/AlertRuleGroup' required: false responses: '200': description: AlertRuleGroup headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertRuleGroup' '400': description: ValidationError headers: {} content: application/json: schema: $ref: '#/components/schemas/ValidationError' deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true delete: tags: - Groups summary: Grafana Route Delete Alert Rule Group description: Deletes a specific alert rule group within a designated folder in Grafana's provisioning API. This operation requires both the folder's unique identifier (FolderUID) and the name of the alert rule group (Group) to be specified in the URL path. When executed, it removes the entire rule group and all alert rules contained within it from the Grafana instance. This is a destructive operation typically used when cleaning up monitoring configurations or reorganizing alert structures, and it requires appropriate permissions to modify provisioning resources in Grafana. operationId: routeDeleteAlertRuleGroup parameters: - name: FolderUID in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '204': description: The alert rule group was deleted successfully. headers: {} content: {} '403': description: ForbiddenError headers: {} content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: NotFound headers: {} content: application/json: schema: type: object contentMediaType: application/json deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export: parameters: [] get: tags: - Groups summary: Grafana Route Get Alert Rule Group Export description: This API operation retrieves and exports a specific alert rule group from Grafana's provisioning system by providing both the parent folder's unique identifier (FolderUID) and the alert rule group name (Group) as path parameters. It allows users to obtain the complete configuration of an alert rule group in an exportable format, which can be used for backup purposes, migration between Grafana instances, or version control of alerting configurations. The GET method ensures this is a read-only operation that doesn't modify any existing alert rule configurations. operationId: routeGetAlertRuleGroupExport parameters: - name: download in: query description: Whether to initiate a download of the file or not. style: form explode: true schema: type: boolean default: false - name: format in: query description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. style: form explode: true schema: allOf: - $ref: '#/components/schemas/format' - description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. - name: FolderUID in: path description: '' required: true schema: type: string - name: Group in: path description: '' required: true schema: type: string responses: '200': description: AlertingFileExport headers: {} content: application/json: schema: $ref: '#/components/schemas/AlertingFileExportisthefullprovisionedfileexport.' application/yaml: schema: contentMediaType: application/yaml application/terraform+hcl: schema: contentMediaType: application/terraform+hcl text/yaml: schema: contentMediaType: text/yaml text/hcl: schema: contentMediaType: text/hcl '404': description: Not found. headers: {} content: {} deprecated: false x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true components: schemas: RelativeTimeRangeExport: title: RelativeTimeRangeExport type: object properties: from: type: integer contentEncoding: int64 to: type: integer contentEncoding: int64 getGroupsResponse: title: getGroupsResponse type: object properties: groups: type: array items: $ref: '#/components/schemas/Group' description: '' total: type: integer contentEncoding: int64 ProvisionedAlertRule: title: ProvisionedAlertRule required: - condition - data - execErrState - folderUID - for - noDataState - orgID - ruleGroup - title type: object properties: annotations: type: object additionalProperties: type: string examples: - runbook_url: https://supercoolrunbook.com/page/13 condition: type: string examples: - A data: type: array items: $ref: '#/components/schemas/AlertQueryrepresentsasinglequeryassociatedwithanalertdefinition.' description: '' examples: - - datasourceUid: __expr__ model: conditions: - evaluator: params: - 0 - 0 type: gt operator: type: and query: params: [] reducer: params: [] type: avg type: query datasource: type: __expr__ uid: __expr__ expression: 1 == 1 hide: false intervalMs: 1000 maxDataPoints: 43200 refId: A type: math queryType: '' refId: A relativeTimeRange: from: 0 to: 0 execErrState: $ref: '#/components/schemas/ExecErrState' folderUID: type: string examples: - project_x for: type: string id: type: integer contentEncoding: int64 isPaused: type: boolean examples: - false keep_firing_for: type: string labels: type: object additionalProperties: type: string examples: - team: sre-team-1 missingSeriesEvalsToResolve: type: integer contentEncoding: int64 examples: - 2 noDataState: $ref: '#/components/schemas/NoDataState' notification_settings: $ref: '#/components/schemas/AlertRuleNotificationSettings' orgID: type: integer contentEncoding: int64 provenance: type: string record: $ref: '#/components/schemas/Record' ruleGroup: maxLength: 190 minLength: 1 type: string examples: - eval_group_1 title: maxLength: 190 minLength: 1 type: string examples: - Always firing uid: maxLength: 40 minLength: 1 pattern: ^[a-zA-Z0-9-_]+$ type: string updated: type: string contentEncoding: date-time readOnly: true ValidationError: title: ValidationError type: object properties: message: type: string examples: - error message AlertRuleGroupExportistheprovisionedfileexportofAlertRuleGroupV1.: title: AlertRuleGroupExportistheprovisionedfileexportofAlertRuleGroupV1. type: object properties: folder: type: string interval: type: integer description: 'A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.' contentEncoding: int64 name: type: string orgId: type: integer contentEncoding: int64 rules: type: array items: $ref: '#/components/schemas/AlertRuleExportistheprovisionedfileexportofmodels.AlertRule.' description: '' ErrorResponseBody: title: ErrorResponseBody required: - message type: object properties: error: type: string description: Error An optional detailed description of the actual error. Only included if running in developer mode. message: type: string description: a human readable version of the error status: type: string description: 'Status An optional status to denote the cause of the error. For example, a 412 Precondition Failed error may include additional information of why that error happened.' SearchTeamGroupsQueryResult: title: SearchTeamGroupsQueryResult type: object properties: page: type: integer contentEncoding: int64 perPage: type: integer contentEncoding: int64 teamGroups: type: array items: $ref: '#/components/schemas/TeamGroupDTO' description: '' totalCount: type: integer contentEncoding: int64 RoleDTO: title: RoleDTO required: - created - description - displayName - group - name - uid - updated - version type: object properties: created: type: string contentEncoding: date-time delegatable: type: boolean description: type: string displayName: type: string global: type: boolean group: type: string hidden: type: boolean mapped: type: boolean name: type: string permissions: type: array items: $ref: '#/components/schemas/Permission' description: '' uid: type: string updated: type: string contentEncoding: date-time version: type: integer contentEncoding: int64 AlertRuleNotificationSettings: title: AlertRuleNotificationSettings required: - receiver type: object properties: active_time_intervals: type: array items: type: string description: 'Override the times when notifications should not be muted. These must match the name of a mute time interval defined in the alertmanager configuration time_intervals section. All notifications will be suppressed unless they are sent at the time that matches any interval.' examples: - - maintenance group_by: type: array items: type: string description: 'Override the labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value ''...'' as the sole label name. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping. Must include ''alertname'' and ''grafana_folder'' if not using ''...''.' default: - alertname - grafana_folder examples: - - alertname - grafana_folder - cluster group_interval: type: string description: 'Override how long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)' examples: - 5m group_wait: type: string description: 'Override how long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)' examples: - 30s mute_time_intervals: type: array items: type: string description: 'Override the times when notifications should be muted. These must match the name of a mute time interval defined in the alertmanager configuration time_intervals section. When muted it will not send any notifications, but otherwise acts normally.' examples: - - maintenance receiver: type: string description: Name of the receiver to send notifications to. examples: - grafana-default-email repeat_interval: type: string description: 'Override how long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more). Note that this parameter is implicitly bound by Alertmanager''s `--data.retention` configuration flag. Notifications will be resent after either repeat_interval or the data retention period have passed, whichever occurs first. `repeat_interval` should not be less than `group_interval`.' examples: - 4h ConvertPrometheusResponse: title: ConvertPrometheusResponse type: object properties: error: type: string errorType: type: string status: type: string messageResponse: title: messageResponse type: object properties: message: type: string Group: title: Group type: object properties: groupID: type: string mappings: {} RouteExport: title: RouteExport type: object properties: active_time_intervals: type: array items: type: string description: '' continue: type: boolean group_by: type: array items: type: string description: '' group_interval: type: string group_wait: type: string match: type: object additionalProperties: type: string description: Deprecated. Remove before v1.0 release. match_re: type: object additionalProperties: type: string matchers: type: array items: $ref: '#/components/schemas/Matchermodelsthematchingofalabel.' description: 'Matchers is a slice of Matchers that is sortable, implements Stringer, and provides a Matches method to match a LabelSet against all Matchers in the slice. Note that some users of Matchers might require it to be sorted.' mute_time_intervals: type: array items: type: string description: '' object_matchers: type: array items: type: array items: type: string receiver: type: string repeat_interval: type: string routes: type: array items: $ref: '#/components/schemas/RouteExport' description: '' description: 'RouteExport is the provisioned file export of definitions.Route. This is needed to hide fields that aren''t useable in provisioning file format. An alternative would be to define a custom MarshalJSON and MarshalYAML that excludes them.' ReceiverExportistheprovisionedfileexportofalerting.ReceiverV1.: title: ReceiverExportistheprovisionedfileexportofalerting.ReceiverV1. type: object properties: disableResolveMessage: type: boolean settings: type: object type: type: string uid: type: string format: title: format enum: - yaml - json - hcl type: string AlertRuleGroup: title: AlertRuleGroup type: object properties: folderUid: type: string interval: type: integer contentEncoding: int64 rules: type: array items: $ref: '#/components/schemas/ProvisionedAlertRule' description: '' title: type: string Permission: title: Permission type: object properties: action: type: string created: type: string contentEncoding: date-time scope: type: string updated: type: string contentEncoding: date-time description: Permission is the model for access control permissions NoDataState: title: NoDataState enum: - Alerting - NoData - OK type: string RelativeTimeRange: title: RelativeTimeRange type: object properties: from: type: integer description: 'A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.' contentEncoding: int64 to: type: integer description: 'A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.' contentEncoding: int64 description: 'RelativeTimeRange is the per query start and end time for requests.' GroupAttributes: title: GroupAttributes type: object properties: roles: type: array items: type: string description: '' AlertRuleNotificationSettingsExportistheprovisionedexportofmodels.NotificationSettings.: title: AlertRuleNotificationSettingsExportistheprovisionedexportofmodels.NotificationSettings. type: object properties: active_time_intervals: type: array items: type: string description: '' group_by: type: array items: type: string description: '' group_interval: type: string group_wait: type: string mute_time_intervals: type: array items: type: string description: '' receiver: type: string repeat_interval: type: string Matchermodelsthematchingofalabel.: title: Matchermodelsthematchingofalabel. type: object properties: Name: type: string Type: type: integer contentEncoding: int64 Value: type: string TeamGroupMapping: title: TeamGroupMapping type: object properties: groupId: type: string ForbiddenError: title: ForbiddenError type: object properties: body: allOf: - $ref: '#/components/schemas/PublicError' - description: 'PublicError is derived from Error and only contains information available to the end user.' NotificationPolicyExportistheprovisionedfileexportofalerting.NotificiationPolicyV1.: title: NotificationPolicyExportistheprovisionedfileexportofalerting.NotificiationPolicyV1. type: object properties: active_time_intervals: type: array items: type: string description: '' continue: type: boolean group_by: type: array items: type: string description: '' group_interval: type: string group_wait: type: string match: type: object additionalProperties: type: string description: Deprecated. Remove before v1.0 release. match_re: type: object additionalProperties: type: string matchers: type: array items: $ref: '#/components/schemas/Matchermodelsthematchingofalabel.' description: 'Matchers is a slice of Matchers that is sortable, implements Stringer, and provides a Matches method to match a LabelSet against all Matchers in the slice. Note that some users of Matchers might require it to be sorted.' mute_time_intervals: type: array items: type: string description: '' object_matchers: type: array items: type: array items: type: string orgId: type: integer contentEncoding: int64 receiver: type: string repeat_interval: type: string routes: type: array items: $ref: '#/components/schemas/RouteExport' description: '' PrometheusRule: title: PrometheusRule type: object properties: alert: type: string annotations: type: object additionalProperties: type: string expr: type: string for: type: string keep_firing_for: type: string labels: type: object additionalProperties: type: string record: type: string ExecErrState: title: ExecErrState enum: - OK - Alerting - Error type: string AlertingFileExportisthefullprovisionedfileexport.: title: AlertingFileExportisthefullprovisionedfileexport. type: object properties: apiVersion: type: integer contentEncoding: int64 contactPoints: type: array items: $ref: '#/components/schemas/ContactPointExportistheprovisionedfileexportofalerting.ContactPointV1.' description: '' groups: type: array items: $ref: '#/components/schemas/AlertRuleGroupExportistheprovisionedfileexportofAlertRuleGroupV1.' description: '' muteTimes: type: array items: $ref: '#/components/schemas/MuteTimeIntervalExport' description: '' policies: type: array items: $ref: '#/components/schemas/NotificationPolicyExportistheprovisionedfileexportofalerting.NotificiationPolicyV1.' description: '' AlertQueryrepresentsasinglequeryassociatedwithanalertdefinition.: title: AlertQueryrepresentsasinglequeryassociatedwithanalertdefinition. type: object properties: datasourceUid: type: string description: Grafana data source unique identifier; it should be '__expr__' for a Server Side Expression operation. model: type: object description: JSON is the raw JSON query and includes the above properties as well as custom properties. queryType: type: string description: 'QueryType is an optional identifier for the type of query. It can be used to distinguish different types of queries.' refId: type: string description: RefID is the unique identifier of the query, set by the frontend call. relativeTimeRange: allOf: - $ref: '#/components/schemas/RelativeTimeRange' - description: 'RelativeTimeRange is the per query start and end time for requests.' PrometheusRuleGroup: title: PrometheusRuleGroup type: object properties: interval: type: integer description: 'A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.' contentEncoding: int64 labels: type: object additionalProperties: type: string limit: type: integer contentEncoding: int64 name: type: string query_offset: type: string rules: type: array items: $ref: '#/components/schemas/PrometheusRule' description: '' ContactPointExportistheprovisionedfileexportofalerting.ContactPointV1.: title: ContactPointExportistheprovisionedfileexportofalerting.ContactPointV1. type: object properties: name: type: string orgId: type: integer contentEncoding: int64 receivers: type: array items: $ref: '#/components/schemas/ReceiverExportistheprovisionedfileexportofalerting.ReceiverV1.' description: '' TeamGroupDTO: title: TeamGroupDTO type: object properties: groupId: type: string orgId: type: integer contentEncoding: int64 teamId: type: integer contentEncoding: int64 uid: type: string PublicError: title: PublicError type: object properties: extra: type: object additionalProperties: {} message: type: string messageId: type: string statusCode: type: integer contentEncoding: int64 description: 'PublicError is derived from Error and only contains information available to the end user.' TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.: title: TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted. type: object properties: name: type: string time_intervals: type: array items: $ref: '#/components/schemas/TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' description: '' Record: title: Record required: - from - metric type: object properties: from: type: string description: Which expression node should be used as the input for the recorded metric. examples: - A metric: type: string description: Name of the recorded metric. examples: - grafana_alerts_ratio target_datasource_uid: type: string description: Which data source should be used to write the output of the recording rule, specified by UID. examples: - my-prom SuccessResponseBody: title: SuccessResponseBody type: object properties: message: type: string AlertRuleExportistheprovisionedfileexportofmodels.AlertRule.: title: AlertRuleExportistheprovisionedfileexportofmodels.AlertRule. type: object properties: annotations: type: object additionalProperties: type: string condition: type: string dashboardUid: type: string data: type: array items: $ref: '#/components/schemas/AlertQueryExportistheprovisionedexportofmodels.AlertQuery.' description: '' execErrState: $ref: '#/components/schemas/ExecErrState' for: type: integer description: 'A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.' contentEncoding: int64 isPaused: type: boolean keepFiringFor: type: integer description: 'A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.' contentEncoding: int64 labels: type: object additionalProperties: type: string missing_series_evals_to_resolve: type: integer contentEncoding: int64 noDataState: $ref: '#/components/schemas/NoDataState' notification_settings: $ref: '#/components/schemas/AlertRuleNotificationSettingsExportistheprovisionedexportofmodels.NotificationSettings.' panelId: type: integer contentEncoding: int64 record: $ref: '#/components/schemas/Recordistheprovisionedexportofmodels.Record.' title: type: string uid: type: string Recordistheprovisionedexportofmodels.Record.: title: Recordistheprovisionedexportofmodels.Record. type: object properties: from: type: string metric: type: string targetDatasourceUid: type: string MuteTimeIntervalExport: title: MuteTimeIntervalExport type: object properties: name: type: string orgId: type: integer contentEncoding: int64 time_intervals: type: array items: $ref: '#/components/schemas/TimeIntervalrepresentsanamedsetoftimeintervalsforwhicharouteshouldbemuted.' description: '' AlertQueryExportistheprovisionedexportofmodels.AlertQuery.: title: AlertQueryExportistheprovisionedexportofmodels.AlertQuery. type: object properties: datasourceUid: type: string model: type: object additionalProperties: {} queryType: type: string refId: type: string relativeTimeRange: $ref: '#/components/schemas/RelativeTimeRangeExport' securitySchemes: BearerAuth: type: http scheme: bearer description: Service account token or API key BasicAuth: type: http scheme: basic ApiKeyAuth: type: apiKey in: header name: Authorization description: 'Format: Bearer '