openapi: 3.0.3 info: title: Grafana HTTP Access Current 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: Current paths: /org: parameters: [] get: tags: - Current summary: Grafana Get Current Org description: This API operation retrieves information about the currently authenticated user's organization in Grafana. When called, it returns details of the organization context that the user is currently operating within, including properties such as the organization ID, name, and address. This is a GET request to the /org endpoint that requires authentication and provides essential context about which organizational scope the user's actions and queries will apply to within the Grafana instance. operationId: getCurrentOrg parameters: [] responses: '200': description: (empty) headers: {} content: application/json: schema: $ref: '#/components/schemas/OrgDetailsDTO' '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 put: tags: - Current summary: Grafana Update Current Org description: Updates the current organization's settings in Grafana, allowing modifications to the organization's name and other configuration properties. This operation requires authentication and operates on the organization context of the currently authenticated user. The request body should contain the updated organization details as a JSON object, and upon successful execution, it returns the updated organization information. This is typically used by organization administrators to manage their organization's metadata and settings through the Grafana HTTP API. operationId: updateCurrentOrg parameters: [] requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/UpdateOrgForm' 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' '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 /org/address: parameters: [] put: tags: - Current summary: Grafana Update Current Org Address description: Updates the physical address information for the currently authenticated organization in Grafana. This PUT endpoint modifies the organization's address details, which may include street address, city, state, postal code, and country information. The operation requires appropriate authentication and permissions to modify organization settings, and it affects only the organization context of the current user session. The updated address information is typically used for administrative purposes, billing, or organizational records within Grafana. operationId: updateCurrentOrgAddress parameters: [] requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/UpdateOrgAddressForm' 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' '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 /org/users: parameters: [] get: tags: - Current summary: Grafana Get Org Users For Current Org description: This API operation retrieves a list of all users who belong to the currently authenticated organization in Grafana. When called, it returns user information for members of the organization context associated with the API request, including details such as user IDs, email addresses, login names, roles within the organization, and authentication information. This is useful for administrators who need to audit organization membership, manage user access, or integrate Grafana's user management with external systems. The operation requires appropriate permissions within the current organization context to execute successfully. operationId: getOrgUsersForCurrentOrg parameters: - name: query in: query description: '' style: form explode: true schema: type: string - name: limit in: query description: '' style: form explode: true schema: type: integer contentEncoding: int64 responses: '200': description: (empty) headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/OrgUserDTO' description: '' contentMediaType: application/json '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: - Current summary: Grafana Add Org User To Current Org description: This API operation allows administrators to add a new user to the current organization in Grafana by sending a POST request to the /org/users endpoint. When invoked, it creates a new membership association between a specified user and the organization that the authenticated user currently belongs to. The request typically requires parameters such as the user's login credentials or user ID, along with the desired role (Viewer, Editor, or Admin) that the new member should have within the organization. This operation requires appropriate administrative permissions and is commonly used when onboarding team members or managing organizational access control in Grafana instances. operationId: addOrgUserToCurrentOrg parameters: [] requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/AddOrgUserCommand' required: true responses: '200': description: An OKResponse is returned if the request was successful. headers: {} content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' '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 /org/users/lookup: parameters: [] get: tags: - Current summary: Grafana Get Org Users For Current Org Lookup description: This API operation retrieves user information for members of the current organization in Grafana by performing a lookup query. It uses a GET request to the '/org/users/lookup' endpoint and returns details about users belonging to the organization context of the authenticated request. This is typically used when you need to search for or validate specific users within your current Grafana organization without iterating through the entire user list, providing a more efficient way to find user data based on lookup criteria such as login name or email address. operationId: getOrgUsersForCurrentOrgLookup parameters: - name: query in: query description: '' style: form explode: true schema: type: string - name: limit in: query description: '' style: form explode: true schema: type: integer contentEncoding: int64 responses: '200': description: (empty) headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/UserLookupDTO' description: '' contentMediaType: application/json '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 /org/users/{user_id}: parameters: [] delete: tags: - Current summary: Grafana Remove Org User For Current Org description: This API operation removes a specified user from the current organization in Grafana by making a DELETE request to the endpoint /org/users/{user_id}, where {user_id} is the unique identifier of the user to be removed. When executed, it disassociates the targeted user from the organization context in which the API call is made, effectively revoking their access and permissions within that specific organization. This operation requires appropriate administrative privileges within the current organization and only affects the user's membership in that particular organization, not their overall Grafana account or memberships in other organizations they may belong to. operationId: removeOrgUserForCurrentOrg parameters: - name: user_id in: path description: '' required: true schema: type: integer contentEncoding: int64 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' '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 patch: tags: - Current summary: Grafana Update Org User For Current Org description: This API operation allows you to update an existing organization user's details within the currently authenticated organization in Grafana. By sending a PATCH request to the endpoint with a specific user ID, you can modify properties such as the user's role within the organization without affecting their underlying Grafana user account. This is particularly useful for managing permissions and access levels of team members, allowing administrators to promote users to admin roles or adjust their organizational privileges while maintaining their user identity across multiple organizations they may belong to. operationId: updateOrgUserForCurrentOrg parameters: - name: user_id in: path description: '' required: true schema: type: integer contentEncoding: int64 requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/UpdateOrgUserCommand' 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' '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 /org/quotas: parameters: [] get: tags: - Current summary: Grafana Get Current Org Quota description: This API operation retrieves the current resource quotas configured for the organization in Grafana. When called, it returns the quota limits that have been set for various resources such as the maximum number of users, dashboards, data sources, and API keys allowed within the organization. This is useful for administrators who need to monitor or verify the current quota settings to ensure they align with organizational policies and resource management requirements. The operation requires appropriate authentication and authorization, typically at the organization administrator level, to access this information. operationId: getCurrentOrgQuota parameters: [] responses: '200': description: (empty) headers: {} content: application/json: schema: type: array items: $ref: '#/components/schemas/QuotaDTO' description: '' contentMediaType: application/json '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 components: schemas: UpdateOrgAddressForm: title: UpdateOrgAddressForm type: object properties: address1: type: string address2: type: string city: type: string country: type: string state: type: string zipcode: type: string QuotaDTO: title: QuotaDTO type: object properties: limit: type: integer contentEncoding: int64 org_id: type: integer contentEncoding: int64 target: type: string used: type: integer contentEncoding: int64 user_id: type: integer contentEncoding: int64 Role: title: Role enum: - None - Viewer - Editor - Admin type: string OrgUserDTO: title: OrgUserDTO type: object properties: accessControl: type: object additionalProperties: type: boolean authLabels: type: array items: type: string description: '' avatarUrl: type: string email: type: string isDisabled: type: boolean isExternallySynced: type: boolean isProvisioned: type: boolean lastSeenAt: type: string contentEncoding: date-time lastSeenAtAge: type: string login: type: string name: type: string orgId: type: integer contentEncoding: int64 role: type: string uid: type: string userId: type: integer contentEncoding: int64 UpdateOrgUserCommand: title: UpdateOrgUserCommand type: object properties: role: $ref: '#/components/schemas/Role' Address: title: Address type: object properties: address1: type: string address2: type: string city: type: string country: type: string state: type: string zipCode: type: string UserLookupDTO: title: UserLookupDTO type: object properties: avatarUrl: type: string login: type: string uid: type: string userId: type: integer contentEncoding: int64 SuccessResponseBody: title: SuccessResponseBody type: object properties: message: type: string 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.' OrgDetailsDTO: title: OrgDetailsDTO type: object properties: address: $ref: '#/components/schemas/Address' id: type: integer contentEncoding: int64 name: type: string UpdateOrgForm: title: UpdateOrgForm type: object properties: name: type: string AddOrgUserCommand: title: AddOrgUserCommand type: object properties: loginOrEmail: type: string role: $ref: '#/components/schemas/Role' 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 '