Grafana Admin Ldap API

The admin_ldap API from Grafana — 5 operation(s) for admin_ldap.

GitHub OpenAPI
Business capability
Identity & Access Management BC-620.20

Operations 5

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 /admin/ldap-sync-status Check the LDAP sync background job · Returns the current state of the LDAP background sync integration #
Ask an LLM
“Is the LDAP background sync currently running?”
“What state is the LDAP sync integration in?”
Tell an agent
Show the LDAP background sync status.
Check whether LDAP sync is active.
POST /admin/ldap/reload Reload the LDAP configuration · Reloads the LDAP configuration #
Ask an LLM
“How do I reload the LDAP configuration without restarting Grafana?”
“Can I force a re-read of LDAP settings?”
Tell an agent
Reload the LDAP configuration.
Force a re-read of the LDAP settings.
GET /admin/ldap/status Test connections to all LDAP servers · Attempts to connect to all the configured LDAP servers and returns information… #
Ask an LLM
“Can Grafana reach each of its configured LDAP servers?”
“What is the connection status of every LDAP server?”
Tell an agent
Test connections to all configured LDAP servers.
Show the LDAP server connection status.
POST /admin/ldap/sync/{user_id} Enable a user for LDAP sync · Enables a single Grafana user to be synchronized against LDAP #
Ask an LLM
“How do I start syncing a Grafana user with LDAP?”
“Can I turn on LDAP sync for one user?”
Tell an agent
Enable LDAP sync for user {user_id}.
Start syncing user {user_id} against LDAP.
GET /admin/ldap/{user_name} Look up a user in LDAP · Finds an user based on a username in LDAP. #
Ask an LLM
“What does LDAP return for a given username?”
“Can I find a user by name in the LDAP directory?”
Tell an agent
Find user {user_name} in LDAP.
Look up the LDAP record for {user_name}.

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-admin-ldap-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-admin-ldap-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. Admin Ldap 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: admin_ldap
paths:
  /admin/ldap-sync-status:
    get:
      description: You need to have a permission with action `ldap.status:read`.
      tags:
      - admin_ldap
      summary: Returns the current state of the LDAP background sync integration
      operationId: getSyncStatus
      responses:
        '200':
          $ref: '#/components/responses/getSyncStatusResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /admin/ldap/reload:
    post:
      description: If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.config:reload`.
      tags:
      - admin_ldap
      summary: Reloads the LDAP configuration
      operationId: reloadLDAPCfg
      responses:
        '410':
          $ref: '#/components/responses/goneError'
      security:
      - basic: []
  /admin/ldap/status:
    get:
      description: If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.status:read`.
      tags:
      - admin_ldap
      summary: Attempts to connect to all the configured LDAP servers and returns information…
      operationId: getLDAPStatus
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      security:
      - basic: []
  /admin/ldap/sync/{user_id}:
    post:
      description: If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:sync`.
      tags:
      - admin_ldap
      summary: Enables a single Grafana user to be synchronized against LDAP
      operationId: postSyncUserWithLDAP
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      security:
      - basic: []
  /admin/ldap/{user_name}:
    get:
      description: If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:read`.
      tags:
      - admin_ldap
      summary: Finds an user based on a username in LDAP.
      operationId: getUserFromLDAP
      parameters:
      - name: user_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/okResponse'
        '401':
          $ref: '#/components/responses/unauthorisedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '500':
          $ref: '#/components/responses/internalServerError'
      security:
      - basic: []
components:
  schemas:
    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
    ActiveSyncStatusDTO:
      description: ActiveSyncStatusDTO holds the information for LDAP background Sync
      type: object
      properties:
        enabled:
          type: boolean
        nextSync:
          type: string
          format: date-time
        prevSync:
          $ref: '#/components/schemas/SyncResult'
        schedule:
          type: string
    FailedUser:
      description: FailedUser holds the information of an user that failed
      type: object
      properties:
        Error:
          type: string
        Login:
          type: string
    SuccessResponseBody:
      type: object
      properties:
        message:
          type: string
    Duration:
      description: 'A Duration represents the elapsed time between two instants

        as an int64 nanosecond count. The representation limits the

        largest representable duration to approximately 290 years.'
      type: integer
      format: int64
    SyncResult:
      type: object
      title: SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.
      properties:
        Elapsed:
          $ref: '#/components/schemas/Duration'
        FailedUsers:
          type: array
          items:
            $ref: '#/components/schemas/FailedUser'
        MissingUserIds:
          type: array
          items:
            type: integer
            format: int64
        Started:
          type: string
          format: date-time
        UpdatedUserIds:
          type: array
          items:
            type: integer
            format: int64
  responses:
    unauthorisedError:
      description: UnauthorizedError is returned when the request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseBody'
    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'
    getSyncStatusResponse:
      description: (empty)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ActiveSyncStatusDTO'
    okResponse:
      description: An OKResponse is returned if the request was successful.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessResponseBody'
    goneError:
      description: GoneError is returned when the requested endpoint was removed.
      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