Grafana Migrations API

The migrations API from Grafana — 10 operation(s) for migrations.

Operations 13

GET /cloudmigration/migration Get a list of all cloud migration sessions that have been created #
POST /cloudmigration/migration Create a migration session #
GET /cloudmigration/migration/{uid} Get a cloud migration session by its uid #
DELETE /cloudmigration/migration/{uid} Delete a migration session by its uid #
POST /cloudmigration/migration/{uid}/snapshot Trigger the creation of an instance snapshot associated with the provided… #
GET /cloudmigration/migration/{uid}/snapshot/{snapshotUid} Get metadata about a snapshot, including where it is in its processing and… #
POST /cloudmigration/migration/{uid}/snapshot/{snapshotUid}/cancel Cancel a snapshot, wherever it is in its processing chain #
POST /cloudmigration/migration/{uid}/snapshot/{snapshotUid}/upload Upload a snapshot to the Grafana Migration Service for processing #
GET /cloudmigration/migration/{uid}/snapshots Get a list of snapshots for a session #
GET /cloudmigration/resources/dependencies Get the resource dependencies graph for the current set of migratable resources #
GET /cloudmigration/token Fetch the cloud migration token if it exists #
POST /cloudmigration/token Create gcom access token #
DELETE /cloudmigration/token/{uid} Deletes a cloud migration token #

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-migrations-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-migrations-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. Migrations 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: Migrations
paths:
  /cloudmigration/migration:
    get:
      tags:
      - Migrations
      summary: Get a list of all cloud migration sessions that have been created
      operationId: getSessionList
      responses:
        '200':
          $ref: '#/components/responses/cloudMigrationSessionListResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
    post:
      tags:
      - Migrations
      summary: Create a migration session
      operationId: createSession
      responses:
        '200':
          $ref: '#/components/responses/cloudMigrationSessionResponse'
        '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/CloudMigrationSessionRequestDTO'
        required: true
  /cloudmigration/migration/{uid}:
    get:
      tags:
      - Migrations
      summary: Get a cloud migration session by its uid
      operationId: getSession
      parameters:
      - description: UID of a migration session
        name: uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/cloudMigrationSessionResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
    delete:
      tags:
      - Migrations
      summary: Delete a migration session by its uid
      operationId: deleteSession
      parameters:
      - description: UID of a migration session
        name: uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /cloudmigration/migration/{uid}/snapshot:
    post:
      description: If the snapshot initialization is successful, the snapshot uid is returned.
      tags:
      - Migrations
      summary: Trigger the creation of an instance snapshot associated with the provided…
      operationId: createSnapshot
      parameters:
      - description: UID of a session
        name: uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/createSnapshotResponse'
        '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/CreateSnapshotRequestDTO'
        required: true
  /cloudmigration/migration/{uid}/snapshot/{snapshotUid}:
    get:
      tags:
      - Migrations
      summary: Get metadata about a snapshot, including where it is in its processing and…
      operationId: getSnapshot
      parameters:
      - description: ResultPage is used for pagination with ResultLimit
        name: resultPage
        in: query
        schema:
          type: integer
          format: int64
          default: 1
      - description: Max limit for snapshot results returned.
        name: resultLimit
        in: query
        schema:
          type: integer
          format: int64
          default: 100
      - description: ResultSortColumn can be used to override the default system sort. Valid values are "name", "resource_type", and "status".
        name: resultSortColumn
        in: query
        schema:
          type: string
          default: default
      - description: ResultSortOrder is used with ResultSortColumn. Valid values are ASC and DESC.
        name: resultSortOrder
        in: query
        schema:
          type: string
          default: ASC
      - description: ErrorsOnly is used to only return resources with error statuses
        name: errorsOnly
        in: query
        schema:
          type: boolean
          default: false
      - description: Session UID of a session
        name: uid
        in: path
        required: true
        schema:
          type: string
      - description: UID of a snapshot
        name: snapshotUid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/getSnapshotResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /cloudmigration/migration/{uid}/snapshot/{snapshotUid}/cancel:
    post:
      description: 'TODO: Implement'
      tags:
      - Migrations
      summary: Cancel a snapshot, wherever it is in its processing chain
      operationId: cancelSnapshot
      parameters:
      - description: Session UID of a session
        name: uid
        in: path
        required: true
        schema:
          type: string
      - description: UID of a snapshot
        name: snapshotUid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: (empty)
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /cloudmigration/migration/{uid}/snapshot/{snapshotUid}/upload:
    post:
      tags:
      - Migrations
      summary: Upload a snapshot to the Grafana Migration Service for processing
      operationId: uploadSnapshot
      parameters:
      - description: Session UID of a session
        name: uid
        in: path
        required: true
        schema:
          type: string
      - description: UID of a snapshot
        name: snapshotUid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: (empty)
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /cloudmigration/migration/{uid}/snapshots:
    get:
      tags:
      - Migrations
      summary: Get a list of snapshots for a session
      operationId: getShapshotList
      parameters:
      - description: Page is used for pagination with limit
        name: page
        in: query
        schema:
          type: integer
          format: int64
          default: 1
      - description: Max limit for results returned.
        name: limit
        in: query
        schema:
          type: integer
          format: int64
          default: 100
      - description: Session UID of a session
        name: uid
        in: path
        required: true
        schema:
          type: string
      - description: Sort with value latest to return results sorted in descending order.
        name: sort
        in: query
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/snapshotListResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /cloudmigration/resources/dependencies:
    get:
      tags:
      - Migrations
      summary: Get the resource dependencies graph for the current set of migratable resources
      operationId: getResourceDependencies
      responses:
        '200':
          $ref: '#/components/responses/resourceDependenciesResponse'
  /cloudmigration/token:
    get:
      tags:
      - Migrations
      summary: Fetch the cloud migration token if it exists
      operationId: getCloudMigrationToken
      responses:
        '200':
          $ref: '#/components/responses/cloudMigrationGetTokenResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/internalServerError'
    post:
      tags:
      - Migrations
      summary: Create gcom access token
      operationId: createCloudMigrationToken
      responses:
        '200':
          $ref: '#/components/responses/cloudMigrationCreateTokenResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /cloudmigration/token/{uid}:
    delete:
      tags:
      - Migrations
      summary: Deletes a cloud migration token
      operationId: deleteCloudMigrationToken
      parameters:
      - description: UID of a cloud migration token
        name: uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/cloudMigrationDeleteTokenResponse'
        '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'
    cloudMigrationSessionListResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CloudMigrationSessionListResponseDTO'
    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'
    resourceDependenciesResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceDependenciesResponseDTO'
    cloudMigrationGetTokenResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAccessTokenResponseDTO'
    cloudMigrationDeleteTokenResponse:
      description: (empty)
    createSnapshotResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSnapshotResponseDTO'
    getSnapshotResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetSnapshotResponseDTO'
    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'
    cloudMigrationCreateTokenResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateAccessTokenResponseDTO'
    snapshotListResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SnapshotListResponseDTO'
    cloudMigrationSessionResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CloudMigrationSessionResponseDTO'
    notFoundError:
      description: NotFoundError is returned when the requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
  schemas:
    SnapshotListResponseDTO:
      type: object
      properties:
        snapshots:
          type: array
          items:
            $ref: '#/components/schemas/SnapshotDTO'
    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
    CreateAccessTokenResponseDTO:
      type: object
      properties:
        token:
          type: string
    ResourceDependencyDTO:
      type: object
      properties:
        dependencies:
          type: array
          items:
            type: string
            enum:
            - DASHBOARD
            - DATASOURCE
            - FOLDER
            - LIBRARY_ELEMENT
            - ALERT_RULE
            - ALERT_RULE_GROUP
            - CONTACT_POINT
            - NOTIFICATION_POLICY
            - NOTIFICATION_TEMPLATE
            - MUTE_TIMING
            - PLUGIN
        resourceType:
          type: string
          enum:
          - DASHBOARD
          - DATASOURCE
          - FOLDER
          - LIBRARY_ELEMENT
          - ALERT_RULE
          - ALERT_RULE_GROUP
          - CONTACT_POINT
          - NOTIFICATION_POLICY
          - NOTIFICATION_TEMPLATE
          - MUTE_TIMING
          - PLUGIN
    CloudMigrationSessionResponseDTO:
      type: object
      properties:
        created:
          type: string
          format: date-time
        slug:
          type: string
        uid:
          type: string
        updated:
          type: string
          format: date-time
    CreateSnapshotResponseDTO:
      type: object
      properties:
        uid:
          type: string
    CreateSnapshotRequestDTO:
      type: object
      properties:
        resourceTypes:
          type: array
          items:
            type: string
            enum:
            - DASHBOARD
            - DATASOURCE
            - FOLDER
            - LIBRARY_ELEMENT
            - ALERT_RULE
            - ALERT_RULE_GROUP
            - CONTACT_POINT
            - NOTIFICATION_POLICY
            - NOTIFICATION_TEMPLATE
            - MUTE_TIMING
            - PLUGIN
    ResourceDependenciesResponseDTO:
      type: object
      properties:
        resourceDependencies:
          type: array
          items:
            $ref: '#/components/schemas/ResourceDependencyDTO'
    GetSnapshotResponseDTO:
      type: object
      properties:
        created:
          type: string
          format: date-time
        finished:
          type: string
          format: date-time
        results:
          type: array
          items:
            $ref: '#/components/schemas/MigrateDataResponseItemDTO'
        sessionUid:
          type: string
        stats:
          $ref: '#/components/schemas/SnapshotResourceStats'
        status:
          type: string
          enum:
          - INITIALIZING
          - CREATING
          - PENDING_UPLOAD
          - UPLOADING
          - PENDING_PROCESSING
          - PROCESSING
          - FINISHED
          - CANCELED
          - ERROR
          - UNKNOWN
        uid:
          type: string
    SnapshotResourceStats:
      type: object
      properties:
        statuses:
          type: object
          additionalProperties:
            type: integer
            format: int64
        total:
          type: integer
          format: int64
        types:
          type: object
          additionalProperties:
            type: integer
            format: int64
    CloudMigrationSessionRequestDTO:
      type: object
      properties:
        authToken:
          type: string
    CloudMigrationSessionListResponseDTO:
      type: object
      properties:
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/CloudMigrationSessionResponseDTO'
    MigrateDataResponseItemDTO:
      type: object
      required:
      - type
      - refId
      - status
      properties:
        errorCode:
          type: string
          enum:
          - ALERT_RULES_QUOTA_REACHED
          - ALERT_RULES_GROUP_QUOTA_REACHED
          - DATASOURCE_NAME_CONFLICT
          - DATASOURCE_INVALID_URL
          - DATASOURCE_ALREADY_MANAGED
          - FOLDER_NAME_CONFLICT
          - DASHBOARD_ALREADY_MANAGED
          - LIBRARY_ELEMENT_NAME_CONFLICT
          - UNSUPPORTED_DATA_TYPE
          - RESOURCE_CONFLICT
          - UNEXPECTED_STATUS_CODE
          - INTERNAL_SERVICE_ERROR
          - GENERIC_ERROR
        message:
          type: string
        name:
          type: string
        parentName:
          type: string
        refId:
          type: string
        status:
          type: string
          enum:
          - OK
          - WARNING
          - ERROR
          - PENDING
          - UNKNOWN
        type:
          type: string
          enum:
          - DASHBOARD
          - DATASOURCE
          - FOLDER
          - LIBRARY_ELEMENT
          - ALERT_RULE
          - ALERT_RULE_GROUP
          - CONTACT_POINT
          - NOTIFICATION_POLICY
          - NOTIFICATION_TEMPLATE
          - MUTE_TIMING
          - PLUGIN
    GetAccessTokenResponseDTO:
      type: object
      properties:
        createdAt:
          type: string
        displayName:
          type: string
        expiresAt:
          type: string
        firstUsedAt:
          type: string
        id:
          type: string
        lastUsedAt:
          type: string
    SnapshotDTO:
      description: Base snapshot without results
      type: object
      properties:
        created:
          type: string
          format: date-time
        finished:
          type: string
          format: date-time
        sessionUid:
          type: string
        status:
          type: string
          enum:
          - INITIALIZING
          - CREATING
          - PENDING_UPLOAD
          - UPLOADING
          - PENDING_PROCESSING
          - PROCESSING
          - FINISHED
          - CANCELED
          - ERROR
          - UNKNOWN
        uid:
          type: string
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
    basic:
      type: http
      scheme: basic