Grafana Licenses API

The Licenses API from Grafana — 3 operation(s) for licenses.

Operations 3

GET /licensing/refresh-stats Grafana Refresh License Stats #
POST /licensing/token Grafana Post License Token #
POST /licensing/token/renew Grafana Post Renew License Token #

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-licenses-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-licenses-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Grafana Licenses API
  description: 'Grafana is an open-source analytics and visualization platform that helps you monitor and analyze data from various sources. It lets you create customizable dashboards with charts, graphs, and alerts to visualize metrics and logs in real-time. Commonly used for monitoring infrastructure, applications, and business metrics, Grafana connects to dozens of data sources like Prometheus, Elasticsearch, and cloud platforms, making it easier to understand system performance, troubleshoot issues, and track key indicators all in one place. '
  contact:
    name: Grafana Labs
    url: https://grafana.com
    email: hello@grafana.com
  version: 0.0.1
servers:
- url: http://{defaultHost}
  variables:
    defaultHost:
      default: www.example.com/api
- url: https://{defaultHost}
  variables:
    defaultHost:
      default: www.example.com/api
security:
- basic: []
- api_key: []
tags:
- name: Licenses
paths:
  /licensing/refresh-stats:
    parameters: []
    get:
      tags:
      - Licenses
      summary: Grafana Refresh License Stats
      description: This API operation refreshes the licensing statistics in Grafana by sending a GET request to the /licensing/refresh-stats endpoint. When invoked, it triggers an update of the current license usage data and metrics, ensuring that the most recent information about license consumption, active users, and other licensing-related statistics are retrieved and synchronized. This operation is typically used by administrators to obtain real-time licensing information without waiting for the automatic refresh cycle, allowing for immediate verification of license compliance and usage patterns within the Grafana instance.
      operationId: refreshLicenseStats
      parameters: []
      responses:
        '200':
          description: (empty)
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserStats'
        '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
  /licensing/token:
    parameters: []
    post:
      tags:
      - Licenses
      summary: Grafana Post License Token
      description: This API operation allows administrators to activate or update a Grafana Enterprise license by submitting a license token via a POST request to the /licensing/token endpoint. When called, it accepts a license token string in the request body, validates the token with Grafana's licensing service, and applies the license to the Grafana instance if valid. This operation is typically used during initial Enterprise setup or when renewing an existing license, and it requires administrative privileges to execute. Upon successful validation, the license details are stored and the Enterprise features associated with that license tier become available to the Grafana instance.
      operationId: postLicenseToken
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteTokenCommand'
        required: true
      responses:
        '200':
          description: (empty)
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
        '400':
          description: BadRequestError is returned when the request is invalid and it cannot be processed.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody'
      deprecated: false
      x-api-evangelist-processing:
        SplitPascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        WriteDescription: true
        ChooseTags: true
  /licensing/token/renew:
    parameters: []
    post:
      tags:
      - Licenses
      summary: Grafana Post Renew License Token
      description: This API operation is used to renew an existing Grafana Enterprise license token. When invoked via a POST request to the /licensing/token/renew endpoint, it initiates the license token renewal process, typically validating the current token and requesting a fresh token from the Grafana licensing server. This operation is essential for maintaining continuous access to Grafana Enterprise features by ensuring the license remains valid and up-to-date. Authentication and appropriate permissions are required to execute this operation, and upon successful renewal, the system receives an updated token that extends the licensing period for the Grafana Enterprise instance.
      operationId: postRenewLicenseToken
      parameters: []
      requestBody:
        description: ''
        content:
          text/plain:
            schema:
              type: object
              contentMediaType: text/plain
        required: true
      responses:
        '200':
          description: (empty)
          headers: {}
          content: {}
        '401':
          description: UnauthorizedError is returned when the request is not authenticated.
          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'
      deprecated: false
      x-api-evangelist-processing:
        SplitPascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        WriteDescription: true
        ChooseTags: true
components:
  schemas:
    Token:
      title: Token
      type: object
      properties:
        account:
          type: string
        anonymousRatio:
          type: integer
          contentEncoding: int64
        company:
          type: string
        details_url:
          type: string
        exp:
          type: integer
          contentEncoding: int64
        iat:
          type: integer
          contentEncoding: int64
        included_users:
          type: integer
          contentEncoding: int64
        iss:
          type: string
        jti:
          type: string
        lexp:
          type: integer
          contentEncoding: int64
        lic_exp_warn_days:
          type: integer
          contentEncoding: int64
        lid:
          type: string
        limit_by:
          type: string
        max_concurrent_user_sessions:
          type: integer
          contentEncoding: int64
        nbf:
          type: integer
          contentEncoding: int64
        prod:
          type: array
          items:
            type: string
          description: ''
        slug:
          type: string
        status:
          type: integer
          contentEncoding: int64
        sub:
          type: string
        tok_exp_warn_days:
          type: integer
          contentEncoding: int64
        trial:
          type: boolean
        trial_exp:
          type: integer
          contentEncoding: int64
        update_days:
          type: integer
          contentEncoding: int64
        usage_billing:
          type: boolean
    DeleteTokenCommand:
      title: DeleteTokenCommand
      type: object
      properties:
        instance:
          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.'
    ActiveUserStats:
      title: ActiveUserStats
      type: object
      properties:
        active_admins_and_editors:
          type: integer
          contentEncoding: int64
        active_anonymous_devices:
          type: integer
          contentEncoding: int64
        active_users:
          type: integer
          contentEncoding: int64
        active_viewers:
          type: integer
          contentEncoding: int64
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
    basic:
      type: http
      scheme: basic