Grafana Folders API

Folders are identified by the identifier (id) and the unique identifier (uid). The identifier (id) of a folder is an auto-incrementing numeric value and is only unique per Grafana install. The unique identifier (uid) of a folder can be used for uniquely identify folders between multiple Grafana installs. It’s automatically generated if not provided when creating a folder. The uid allows having consistent URLs for accessing folders and when syncing folders between multiple Grafana installs. This means that changing the title of a folder will not break any bookmarked links to that folder. The uid can have a maximum length of 40 characters.

Operations 9

GET /folders Get all folders #
POST /folders Create folder #
GET /folders/{folder_uid} Get folder by uid #
PUT /folders/{folder_uid} Update folder #
DELETE /folders/{folder_uid} Delete folder #
GET /folders/{folder_uid}/counts Gets the count of each descendant of a folder by kind. #
POST /folders/{folder_uid}/move Move folder #
GET /folders/{folder_uid}/permissions Gets all existing permissions for the folder with the given `uid` #
POST /folders/{folder_uid}/permissions Updates permissions for a folder. #

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-folders-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-folders-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. Folders 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: Folders are identified by the identifier (id) and the unique identifier (uid).
  name: Folders
paths:
  /folders:
    get:
      description: 'It returns all folders that the authenticated user has permission to view.

        If nested folders are enabled, it expects an additional query parameter with the parent folder UID

        and returns the immediate subfolders that the authenticated user has permission to view.

        If the parameter is not supplied then it returns immediate subfolders under the root

        that the authenticated user has permission to view.


        Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders'
      tags:
      - Folders
      summary: Get all folders
      operationId: getFolders
      deprecated: true
      parameters:
      - description: Limit the maximum number of folders to return
        name: limit
        in: query
        schema:
          type: integer
          format: int64
          default: 1000
      - description: Page index for starting fetching folders
        name: page
        in: query
        schema:
          type: integer
          format: int64
          default: 1
      - description: The parent folder UID
        name: parentUid
        in: query
        schema:
          type: string
      - description: Set to `Edit` to return folders that the user can edit
        name: permission
        in: query
        schema:
          type: string
          enum:
          - Edit
          - View
          default: View
      responses:
        '200':
          $ref: '#/components/responses/getFoldersResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
    post:
      description: 'If nested folders are enabled then it additionally expects the parent folder UID.


        Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}'
      tags:
      - Folders
      summary: Create folder
      operationId: createFolder
      deprecated: true
      responses:
        '200':
          $ref: '#/components/responses/folderResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '409':
          $ref: '#/components/responses/conflictError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFolderCommand'
        required: true
  /folders/{folder_uid}:
    get:
      description: 'Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}'
      tags:
      - Folders
      summary: Get folder by uid
      operationId: getFolderByUID
      deprecated: true
      parameters:
      - name: folder_uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/folderResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/internalServerError'
    put:
      description: 'Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}'
      tags:
      - Folders
      summary: Update folder
      operationId: updateFolder
      deprecated: true
      parameters:
      - name: folder_uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/folderResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '409':
          $ref: '#/components/responses/conflictError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFolderCommand'
        description: 'To change the unique identifier (uid), provide another one.

          To overwrite an existing folder with newer version, set `overwrite` to `true`.

          Provide the current version to safelly update the folder: if the provided version differs from the stored one the request will fail, unless `overwrite` is `true`.'
        required: true
    delete:
      description: 'Deletes an existing folder identified by UID along with all dashboards (and their alerts) stored in the folder. This operation cannot be reverted.

        If nested folders are enabled then it also deletes all the subfolders.


        Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}'
      tags:
      - Folders
      summary: Delete folder
      operationId: deleteFolder
      deprecated: true
      parameters:
      - name: folder_uid
        in: path
        required: true
        schema:
          type: string
      - description: 'If `true` any Grafana 8 Alerts under this folder will be deleted.

          Set to `false` so that the request will fail if the folder contains any Grafana 8 Alerts.'
        name: forceDeleteRules
        in: query
        schema:
          type: boolean
          default: false
      responses:
        '200':
          $ref: '#/components/responses/deleteFolderResponse'
        '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'
  /folders/{folder_uid}/counts:
    get:
      description: 'Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}'
      tags:
      - Folders
      summary: Gets the count of each descendant of a folder by kind.
      operationId: getFolderDescendantCounts
      deprecated: true
      parameters:
      - name: folder_uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/getFolderDescendantCountsResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /folders/{folder_uid}/move:
    post:
      description: 'Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid},

        Changing the parent folder annotation'
      tags:
      - Folders
      summary: Move folder
      operationId: moveFolder
      deprecated: true
      parameters:
      - name: folder_uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/folderResponse'
        '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/MoveFolderCommand'
        required: true
  /folders/{folder_uid}/permissions:
    get:
      tags:
      - Folders
      summary: Gets all existing permissions for the folder with the given `uid`
      operationId: getFolderPermissionList
      deprecated: true
      parameters:
      - name: folder_uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/getFolderPermissionListResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/internalServerError'
    post:
      tags:
      - Folders
      summary: Updates permissions for a folder.
      operationId: updateFolderPermissions
      parameters:
      - name: folder_uid
        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'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDashboardACLCommand'
        required: true
components:
  schemas:
    DashboardACLInfoDTO:
      type: object
      properties:
        created:
          type: string
          format: date-time
        dashboardId:
          type: integer
          format: int64
        folderId:
          description: 'Deprecated: use FolderUID instead'
          type: integer
          format: int64
          x-deprecated: true
        folderUid:
          type: string
        inherited:
          type: boolean
        isFolder:
          type: boolean
        permission:
          $ref: '#/components/schemas/DashboardaccessPermissionType'
        permissionName:
          type: string
        role:
          type: string
          enum:
          - None
          - Viewer
          - Editor
          - Admin
        slug:
          type: string
        team:
          type: string
        teamAvatarUrl:
          type: string
        teamEmail:
          type: string
        teamId:
          type: integer
          format: int64
        teamUid:
          type: string
        title:
          type: string
        uid:
          type: string
        updated:
          type: string
          format: date-time
        url:
          type: string
        userAvatarUrl:
          type: string
        userEmail:
          type: string
        userId:
          type: integer
          format: int64
        userLogin:
          type: string
        userUid:
          type: string
    Folder:
      type: object
      properties:
        accessControl:
          $ref: '#/components/schemas/Metadata'
        canAdmin:
          type: boolean
        canDelete:
          type: boolean
        canEdit:
          type: boolean
        canSave:
          type: boolean
        created:
          type: string
          format: date-time
        createdBy:
          type: string
        hasAcl:
          type: boolean
        id:
          description: 'Deprecated: use UID instead'
          type: integer
          format: int64
          x-deprecated: true
        managedBy:
          $ref: '#/components/schemas/ManagerKind'
        orgId:
          type: integer
          format: int64
        parentUid:
          description: only used if nested folders are enabled
          type: string
        parents:
          description: the parent folders starting from the root going down
          type: array
          items:
            $ref: '#/components/schemas/Folder'
        title:
          type: string
        uid:
          type: string
        updated:
          type: string
          format: date-time
        updatedBy:
          type: string
        url:
          type: string
        version:
          type: integer
          format: int64
    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
    DashboardACLUpdateItem:
      type: object
      properties:
        permission:
          $ref: '#/components/schemas/DashboardaccessPermissionType'
        role:
          type: string
          enum:
          - None
          - Viewer
          - Editor
          - Admin
        teamId:
          type: integer
          format: int64
        userId:
          type: integer
          format: int64
    FolderSearchHit:
      type: object
      properties:
        id:
          type: integer
          format: int64
        managedBy:
          $ref: '#/components/schemas/ManagerKind'
        parentUid:
          type: string
        title:
          type: string
        uid:
          type: string
    MoveFolderCommand:
      description: 'MoveFolderCommand captures the information required by the folder service

        to move a folder.'
      type: object
      properties:
        parentUid:
          type: string
    DescendantCounts:
      type: object
      additionalProperties:
        type: integer
        format: int64
    UpdateFolderCommand:
      description: 'UpdateFolderCommand captures the information required by the folder service

        to update a folder. Use Move to update a folder''s parent folder.'
      type: object
      properties:
        description:
          description: NewDescription it's an optional parameter used for overriding the existing folder description
          type: string
        overwrite:
          description: Overwrite only used by the legacy folder implementation
          type: boolean
        title:
          description: NewTitle it's an optional parameter used for overriding the existing folder title
          type: string
        version:
          description: Version only used by the legacy folder implementation
          type: integer
          format: int64
    ManagerKind:
      description: It can be a user or a tool or a generic API client.
      type: string
      title: ManagerKind is the type of manager, which is responsible for managing the resource.
    CreateFolderCommand:
      description: 'CreateFolderCommand captures the information required by the folder service

        to create a folder.'
      type: object
      properties:
        description:
          type: string
        parentUid:
          type: string
        title:
          type: string
        uid:
          type: string
    UpdateDashboardACLCommand:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/DashboardACLUpdateItem'
    DashboardaccessPermissionType:
      type: integer
      format: int64
    SuccessResponseBody:
      type: object
      properties:
        message:
          type: string
    Metadata:
      description: 'Metadata contains user accesses for a given resource

        Ex: map[string]bool{"create":true, "delete": true}'
      type: object
      additionalProperties:
        type: boolean
  responses:
    unauthorisedError:
      description: UnauthorizedError is returned when the request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    getFolderPermissionListResponse:
      description: (empty)
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/DashboardACLInfoDTO'
    getFolderDescendantCountsResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DescendantCounts'
    internalServerError:
      description: InternalServerError is a general error indicating something went wrong internally.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    conflictError:
      description: ConflictError
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    deleteFolderResponse:
      description: (empty)
      content:
        application/json:
          schema:
            type: object
            required:
            - id
            - title
            - message
            properties:
              id:
                description: ID Identifier of the deleted folder.
                type: integer
                format: int64
                example: 65
              message:
                description: Message Message of the deleted folder.
                type: string
                example: Folder My Folder deleted
              title:
                description: Title of the deleted folder.
                type: string
                example: My Folder
    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'
    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'
    getFoldersResponse:
      description: (empty)
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/FolderSearchHit'
    folderResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Folder'
    notFoundError:
      description: NotFoundError is returned when the requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
    basic:
      type: http
      scheme: basic