Grafana Org API

If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.

Operations 15

GET /org Get current Organization #
PUT /org Update current Organization #
PUT /org/address Update current Organization's address #
GET /org/invites Get pending invites #
POST /org/invites Add invite #
DELETE /org/invites/{invitation_code}/revoke Revoke invite #
GET /org/preferences Get Current Org Prefs #
PUT /org/preferences Update Current Org Prefs #
PATCH /org/preferences Patch Current Org Prefs #
GET /org/quotas Fetch Organization quota #
GET /org/users Get all users within the current organization #
POST /org/users Add a new user to the current organization #
GET /org/users/lookup Get all users within the current organization (lookup) #
DELETE /org/users/{user_id} Delete user in current organization #
PATCH /org/users/{user_id} Updates the given user #

Documentation

📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/
📖
Authentication
https://grafana.com/docs/grafana/latest/developers/http_api/authentication/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_versions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_public/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder_dashboard_search/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/data_source/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/datasource_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/datasource_lbac_rules/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/annotations/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/org/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/user/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/team/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/team_sync/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/preferences/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/access_control/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/sso-settings/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/admin/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/licensing/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/reporting/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/query_and_resource_caching/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/library_element/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/correlations/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/snapshot/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/short_url/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/query_history/

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/grafana-com-org-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

grafana-com-org-api-openapi.yml Raw ↑
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. Org 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:
- description: If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.
  name: Org
paths:
  /org:
    get:
      tags:
      - Org
      summary: Get current Organization
      operationId: getCurrentOrg
      responses:
        '200':
          $ref: '#/components/responses/getCurrentOrgResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
    put:
      tags:
      - Org
      summary: Update current Organization
      operationId: updateCurrentOrg
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrgForm'
        required: true
  /org/address:
    put:
      tags:
      - Org
      summary: Update current Organization's address
      operationId: updateCurrentOrgAddress
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrgAddressForm'
        required: true
  /org/invites:
    get:
      tags:
      - Org
      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:
      - Org
      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:
      - Org
      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'
  /org/preferences:
    get:
      description: Use /apis/preferences.grafana.app/v1/namespaces/{namespace}/preferences/namespace
      tags:
      - Org
      summary: Get Current Org Prefs
      operationId: getOrgPreferences
      deprecated: true
      responses:
        '200':
          $ref: '#/components/responses/getPreferencesResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
    put:
      description: Use /apis/preferences.grafana.app/v1/namespaces/{namespace}/preferences/namespace
      tags:
      - Org
      summary: Update Current Org Prefs
      operationId: updateOrgPreferences
      deprecated: true
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePrefsCmd'
        required: true
    patch:
      description: Use /apis/preferences.grafana.app/v1/namespaces/{namespace}/preferences/namespace
      tags:
      - Org
      summary: Patch Current Org Prefs
      operationId: patchOrgPreferences
      deprecated: true
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchPrefsCmd'
        required: true
  /org/quotas:
    get:
      description: If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).
      tags:
      - Org
      summary: Fetch Organization quota
      operationId: getCurrentOrgQuota
      responses:
        '200':
          $ref: '#/components/responses/getQuotaResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /org/users:
    get:
      description: 'Returns all org users within the current organization. Accessible to users with org admin role.

        If you are running Grafana Enterprise and have Fine-grained access control enabled

        you need to have a permission with action: `org.users:read` with scope `users:*`.'
      tags:
      - Org
      summary: Get all users within the current organization
      operationId: getOrgUsersForCurrentOrg
      parameters:
      - name: query
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/getOrgUsersForCurrentOrgResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
    post:
      description: 'Adds a global user to the current organization.


        If you are running Grafana Enterprise and have Fine-grained access control enabled

        you need to have a permission with action: `org.users:add` with scope `users:*`.'
      tags:
      - Org
      summary: Add a new user to the current organization
      operationId: addOrgUserToCurrentOrg
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrgUserCommand'
        required: true
  /org/users/lookup:
    get:
      description: 'Returns all org users within the current organization, but with less detailed information.

        Accessible to users with org admin role, admin in any folder or admin of any team.

        Mainly used by Grafana UI for providing list of users when adding team members and when editing folder/dashboard permissions.'
      tags:
      - Org
      summary: Get all users within the current organization (lookup)
      operationId: getOrgUsersForCurrentOrgLookup
      parameters:
      - name: query
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/getOrgUsersForCurrentOrgLookupResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /org/users/{user_id}:
    delete:
      description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled

        you need to have a permission with action: `org.users:remove` with scope `users:*`.'
      tags:
      - Org
      summary: Delete user in current organization
      operationId: removeOrgUserForCurrentOrg
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
    patch:
      description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled

        you need to have a permission with action: `org.users.role:update` with scope `users:*`.'
      tags:
      - Org
      summary: Updates the given user
      operationId: updateOrgUserForCurrentOrg
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrgUserCommand'
        required: true
components:
  responses:
    getOrgUsersForCurrentOrgResponse:
      description: (empty)
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/OrgUserDTO'
    unauthorisedError:
      description: UnauthorizedError is returned when the request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    getCurrentOrgResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OrgDetailsDTO'
    internalServerError:
      description: InternalServerError is a general error indicating something went wrong internally.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    badRequestError:
      description: BadRequestError is returned when the request is invalid and it cannot be processed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    getOrgUsersForCurrentOrgLookupResponse:
      description: (empty)
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/UserLookupDTO'
    getPreferencesResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PreferencesSpec'
    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'
    getQuotaResponse:
      description: (empty)
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/QuotaDTO'
    getPendingOrgInvitesResponse:
      description: (empty)
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/TempUserDTO'
    SMTPNotEnabledError:
      description: (empty)
      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'
  schemas:
    NavbarPreference:
      type: object
      properties:
        bookmarkUrls:
          type: array
          items:
            type: string
    QueryHistoryPreference:
      type: object
      properties:
        homeTab:
          type: string
    Address:
      type: object
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        country:
          type: string
        state:
          type: string
        zipCode:
          type: string
    OrgDetailsDTO:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        id:
          type: integer
          format: int64
        name:
          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
    PreferencesNavbarPreference:
      type: object
      properties:
        bookmarkUrls:
          type: array
          items:
            type: string
    PatchPrefsCmd:
      type: object
      properties:
        homeDashboardId:
          description: 'The numerical :id of a favorited dashboard

            Deprecated: Use HomeDashboardUID instead'
          type: integer
          format: int64
          default: 0
        homeDashboardUID:
          type: string
        language:
          type: string
        navbar:
          $ref: '#/components/schemas/NavbarPreference'
        queryHistory:
          $ref: '#/components/schemas/QueryHistoryPreference'
        theme:
          type: string
          enum:
          - light
          - dark
        timezone:
          description: Any IANA timezone string (e.g. America/New_York), 'utc', 'browser', or empty string
          type: string
        weekStart:
          type: string
    AddOrgUserCommand:
      type: object
      properties:
        loginOrEmail:
          type: string
        role:
          type: string
          enum:
          - None
          - Viewer
          - Editor
          - Admin
    UpdateOrgUserCommand:
      type: object
      properties:
        role:
          type: string
          enum:
          - None
          - Viewer
          - Editor
          - Admin
    UserLookupDTO:
      type: object
      properties:
        avatarUrl:
          type: string
        login:
          type: string
        uid:
          type: string
        userId:
          type: integer
          format: int64
    TempUserStatus:
      type: string
    UpdateOrgAddressForm:
      type: object
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        country:
          type: string
        state:
          type: string
        zipcode:
          type: string
    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
    PreferencesSpec:
      type: object
      properties:
        homeDashboardUID:
          description: UID for the home dashboard
          type: string
        homeURL:
          description: 'Explicit home URL (NOTE: this can only be modified in the system settings)'
          type: string
        language:
          description: Selected language
          type: string
        navbar:
          $ref: '#/components/schemas/PreferencesNavbarPreference'
        queryHistory:
          $ref: '#/components/schemas/PreferencesQueryHistoryPreference'
        theme:
          description: user interface theme
          type: string
        timezone:
          description: The timezone selection
          type: string
        weekStart:
          description: day of the week (sunday, monday, etc)
          type: string
    PreferencesQueryHistoryPreference:
      type: object
      properties:
        homeTab:
          description: 'one of: '''' | ''query'' | ''starred'';'
          type: string
    UpdateOrgForm:
      type: object
      properties:
        name:
          type: string
    UpdatePrefsCmd:
      type: object
      properties:
        homeDashboardId:
          description: 'The numerical :id of a favorited dashboard

            Deprecated: Use HomeDashboardUID instead'
          type: integer
          format: int64
          default: 0
        homeDashboardUID:
          type: string
        language:
          type: string
        navbar:
          $ref: '#/components/schemas/NavbarPreference'
        queryHistory:
          $ref: '#/components/schemas/QueryHistoryPreference'
        theme:
          type: string
          enum:
          - light
          - dark
          - system
        timezone:
          description: Any IANA timezone string (e.g. America/New_York), 'utc', 'browser', or empty string
          type: string
        weekStart:
          type: string
    AddInviteForm:
      type: object
      properties:
        loginOrEmail:
          type: string
        name:
          type: string
        role:
          type: string
          enum:
          - None
          - Viewer
          - Editor
          - Admin
        sendEmail:
          type: boolean
    QuotaDTO:
      type: object
      properties:
        limit:
          type: integer
          format: int64
        org_id:
          type: integer
          format: int64
        target:
          type: string
        used:
          type: integer
          format: int64
        user_id:
          type: integer
          format: int64
    OrgUserDTO:
      type: object
      properties:
        accessControl:
          type: object
          additionalProperties:
            type: boolean
        authLabels:
          type: array
          items:
            type: string
        avatarUrl:
          type: string
        created:
          type: string
          format: date-time
        email:
          type: string
        isDisabled:
          type: boolean
        isExternallySynced:
          type: boolean
        isProvisioned:
          type: boolean
        lastSeenAt:
          type: string
          format: date-time
        lastSeenAtAge:
          type: string
        login:
          type: string
        name:
          type: string
        orgId:
          type: integer
          format: int64
        role:
          type: string
        uid:
          type: string
        userId:
          type: integer
          format: int64
    SuccessResponseBody:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
    basic:
      type: http
      scheme: basic