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. Invites 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: Invites paths: /org/invites: get: tags: - Invites summary: Get pending invites operationId: getPendingOrgInvites responses: '200': $ref: '#/components/responses/getPendingOrgInvitesResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '500': $ref: '#/components/responses/internalServerError' post: tags: - Invites summary: Add invite operationId: addOrgInvite responses: '200': $ref: '#/components/responses/okResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '412': $ref: '#/components/responses/SMTPNotEnabledError' '500': $ref: '#/components/responses/internalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/AddInviteForm' required: true /org/invites/{invitation_code}/revoke: delete: tags: - Invites summary: Revoke invite operationId: revokeInvite parameters: - name: invitation_code in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/okResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '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' getPendingOrgInvitesResponse: description: (empty) content: application/json: schema: type: array items: $ref: '#/components/schemas/TempUserDTO' badRequestError: description: BadRequestError is returned when the request is invalid and it cannot be processed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' okResponse: description: An OKResponse is returned if the request was successful. content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' SMTPNotEnabledError: description: (empty) content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' 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: 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 AddInviteForm: type: object properties: loginOrEmail: type: string name: type: string role: type: string enum: - None - Viewer - Editor - Admin sendEmail: type: boolean TempUserDTO: type: object properties: code: type: string createdOn: type: string format: date-time email: type: string emailSent: type: boolean emailSentOn: type: string format: date-time id: type: integer format: int64 invitedByEmail: type: string invitedByLogin: type: string invitedByName: type: string name: type: string orgId: type: integer format: int64 role: type: string enum: - None - Viewer - Editor - Admin status: $ref: '#/components/schemas/TempUserStatus' url: type: string SuccessResponseBody: type: object properties: message: type: string TempUserStatus: type: string securitySchemes: api_key: type: apiKey name: Authorization in: header basic: type: http scheme: basic