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. Sync Team Groups 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: - name: sync_team_groups paths: /teams/{teamId}/groups: get: tags: - sync_team_groups summary: Get External Groups operationId: getTeamGroupsApi parameters: - name: teamId in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/getTeamGroupsApiResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' post: tags: - sync_team_groups summary: Add External Group operationId: addTeamGroupApi parameters: - name: teamId in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/okResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/TeamGroupMapping' required: true delete: tags: - sync_team_groups summary: Remove External Group operationId: removeTeamGroupApiQuery parameters: - name: groupId in: query schema: type: string - name: teamId in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/okResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' /teams/{teamId}/groups/search: get: tags: - sync_team_groups summary: Search for team groups with optional filtering and pagination operationId: searchTeamGroups parameters: - name: teamId in: path required: true schema: type: integer format: int64 - name: page in: query schema: type: integer format: int64 default: 1 - description: Number of items per page name: perpage in: query schema: type: integer format: int64 default: 1000 - 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. name: query in: query schema: type: string - description: Filter by exact name match name: name in: query schema: type: string responses: '200': $ref: '#/components/responses/searchTeamGroupsResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '500': $ref: '#/components/responses/internalServerError' components: responses: unauthorisedError: description: UnauthorizedError is returned when the request is not authenticated. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' internalServerError: description: InternalServerError is a general error indicating something went wrong internally. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' notFoundError: description: NotFoundError is returned when the requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' getTeamGroupsApiResponse: description: (empty) content: application/json: schema: type: array items: $ref: '#/components/schemas/TeamGroupDTO' badRequestError: description: BadRequestError is returned when the request is invalid and it cannot be processed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' searchTeamGroupsResponse: description: (empty) content: application/json: schema: type: array items: $ref: '#/components/schemas/SearchTeamGroupsQueryResult' okResponse: description: An OKResponse is returned if the request was successful. content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' forbiddenError: description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' schemas: TeamGroupMapping: description: '---------------------' type: object properties: groupId: type: string ErrorResponseBody: type: object required: - message properties: error: description: Error An optional detailed description of the actual error. Only included if running in developer mode. type: string message: description: a human readable version of the error type: string status: 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.' type: string SuccessResponseBody: type: object properties: message: type: string SearchTeamGroupsQueryResult: type: object properties: page: type: integer format: int64 perPage: type: integer format: int64 teamGroups: type: array items: $ref: '#/components/schemas/TeamGroupDTO' totalCount: type: integer format: int64 TeamGroupDTO: type: object properties: groupId: type: string orgId: type: integer format: int64 teamId: type: integer format: int64 teamUid: type: string uid: description: 'Deprecated: always empty; no per-entry id.' type: string x-deprecated: true securitySchemes: api_key: type: apiKey name: Authorization in: header basic: type: http scheme: basic