Grafana Preferences API

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

GitHub OpenAPI

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /org/preferences Get the organization's preferences · Get Current Org Prefs #
Ask an LLM
“What theme and language is my organization set to?”
“Which dashboard is my organization's home dashboard?”
Tell an agent
Show my organization's preferences.
Get the org's theme and timezone settings.
PUT /org/preferences Set the organization's preferences · Update Current Org Prefs #
Ask an LLM
“How do I set my organization's default theme and timezone?”
“Can I change the organization's home dashboard?”
Tell an agent
Set the organization's theme to {theme}.
Set the org's default home dashboard to {homeDashboardUID}.
PATCH /org/preferences Patch the organization's preferences · Patch Current Org Prefs #
Ask an LLM
“Can I change just one organization preference without resending the rest?”
“Is there a partial update for org preferences?”
Tell an agent
Patch the organization's timezone to {timezone}.
Change only the org's home dashboard to {homeDashboardUID}.
GET /teams/{team_id}/preferences Get a team's preferences · Get Team Preferences #
Ask an LLM
“What preferences does a particular team have?”
“Which theme is one team using?”
Tell an agent
Show the preferences of team {team_id}.
Get team {team_id}'s theme and language settings.
PUT /teams/{team_id}/preferences Set a team's preferences · Update Team Preferences #
Ask an LLM
“How do I set a team's default dashboard and theme?”
“Can I change a team's timezone?”
Tell an agent
Set team {team_id}'s theme to {theme}.
Set team {team_id}'s home dashboard to {homeDashboardUID}.
GET /user/preferences Get my user preferences · Get user preferences #
Ask an LLM
“What theme and language do I have set?”
“Which dashboard is my home dashboard?”
Tell an agent
Show my user preferences.
Get my theme and timezone settings.
PUT /user/preferences Set my user preferences · Update user preferences #
Ask an LLM
“How do I change my own theme and timezone?”
“Can I set my home dashboard?”
Tell an agent
Set my theme to {theme}.
Set my home dashboard to {homeDashboardUID}.
PATCH /user/preferences Patch my user preferences · Patch user preferences #
Ask an LLM
“Can I change just my language without resending my theme?”
“Is there a partial update for my preferences?”
Tell an agent
Patch my timezone to {timezone}.
Change only my home dashboard to {homeDashboardUID}.

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:grafana-com-preferences-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

grafana-com-preferences-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. Preferences 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: Preferences
paths:
  /org/preferences:
    get:
      description: Use /apis/preferences.grafana.app/v1/namespaces/{namespace}/preferences/namespace
      tags:
      - Preferences
      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:
      - Preferences
      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:
      - Preferences
      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
  /teams/{team_id}/preferences:
    get:
      tags:
      - Preferences
      summary: Get Team Preferences
      operationId: getTeamPreferences
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/getPreferencesResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '500':
          $ref: '#/components/responses/internalServerError'
    put:
      tags:
      - Preferences
      summary: Update Team Preferences
      operationId: updateTeamPreferences
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePrefsCmd'
        required: true
  /user/preferences:
    get:
      description: Use /apis/preferences.grafana.app/v1/namespaces/{namespace}/preferences/user-{uid}
      tags:
      - Preferences
      summary: Get user preferences
      operationId: getUserPreferences
      deprecated: true
      responses:
        '200':
          $ref: '#/components/responses/getPreferencesResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '500':
          $ref: '#/components/responses/internalServerError'
    put:
      description: 'Use /apis/preferences.grafana.app/v1/namespaces/{namespace}/preferences/user-{uid}


        Omitting a key (`theme`, `homeDashboardUID`, `timezone`) will cause the current value to be replaced with the system default value.'
      tags:
      - Preferences
      summary: Update user preferences
      operationId: updateUserPreferences
      deprecated: true
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '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/user-{uid}
      tags:
      - Preferences
      summary: Patch user preferences
      operationId: patchUserPreferences
      deprecated: true
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '500':
          $ref: '#/components/responses/internalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchPrefsCmd'
        required: true
components:
  schemas:
    QueryHistoryPreference:
      type: object
      properties:
        homeTab:
          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
    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
    PreferencesNavbarPreference:
      type: object
      properties:
        bookmarkUrls:
          type: array
          items:
            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
    SuccessResponseBody:
      type: object
      properties:
        message:
          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
    NavbarPreference:
      type: object
      properties:
        bookmarkUrls:
          type: array
          items:
            type: string
  responses:
    unauthorisedError:
      description: UnauthorizedError is returned when the request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    getPreferencesResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PreferencesSpec'
    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'
    okResponse:
      description: An OKResponse is returned if the request was successful.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessResponseBody'
    badRequestError:
      description: BadRequestError is returned when the request is invalid and it cannot be processed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    internalServerError:
      description: InternalServerError is a general error indicating something went wrong internally.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
    basic:
      type: http
      scheme: basic
x-provenance:
  method: harvested
  publisher: Grafana
  source: https://raw.githubusercontent.com/grafana/grafana/main/public/api-merged.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)