openapi: 3.0.3 info: title: Grafana HTTP Access Ldap API description: The Grafana HTTP API provides programmatic access to Grafana's core functionality including dashboards, data sources, alerts, users, organizations, folders, annotations, and teams. Authentication is handled via API keys, basic auth, or OAuth tokens passed in the Authorization header. version: 11.0.0 contact: name: Grafana Labs url: https://grafana.com license: name: AGPL-3.0 url: https://www.gnu.org/licenses/agpl-3.0.html servers: - url: https://{instance}.grafana.net/api description: Grafana Cloud variables: instance: default: your-instance - url: http://localhost:3000/api description: Local Grafana instance security: - BearerAuth: [] - BasicAuth: [] - ApiKeyAuth: [] tags: - name: Ldap paths: /admin/ldap/reload: parameters: [] post: tags: - Ldap summary: Grafana Reload LDAP Cfg description: Reloads the LDAP configuration in Grafana without requiring a server restart. This administrative endpoint triggers a refresh of LDAP settings, allowing changes made to the LDAP configuration file to take effect immediately. It is particularly useful when updates to LDAP connection parameters, search bases, group mappings, or authentication settings need to be applied on-the-fly. Only users with administrator privileges can execute this operation, and it requires proper authentication and authorization. The endpoint responds with a success status once the LDAP configuration has been successfully reloaded, or returns an error if the configuration is invalid or the reload process fails. operationId: reloadLDAPCfg parameters: [] responses: '200': description: An OKResponse is returned if the request was successful. headers: {} content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false security: - basic: [] x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /admin/ldap/status: parameters: [] get: tags: - Ldap summary: Grafana Get LDAP Status description: This API operation retrieves the current status of LDAP integration in Grafana by sending a GET request to the /admin/ldap/status endpoint. It provides administrators with information about the LDAP connection status, configuration validation, and whether the LDAP authentication system is functioning properly. The endpoint returns details that help verify if Grafana can successfully communicate with the configured LDAP server, making it useful for troubleshooting authentication issues and monitoring the health of LDAP-based user authentication within the Grafana instance. operationId: getLDAPStatus parameters: [] responses: '200': description: An OKResponse is returned if the request was successful. headers: {} content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false security: - basic: [] x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /admin/ldap/sync/{user_id}: parameters: [] post: tags: - Ldap summary: Grafana Post Sync User With LDAP description: This API operation triggers a synchronization between a specific Grafana user and LDAP directory services by sending a POST request to the endpoint with the target user's ID. When invoked, it forces Grafana to retrieve the latest user information, groups, and permissions from the configured LDAP server for the specified user, updating their local Grafana profile accordingly. This is particularly useful when LDAP user attributes or group memberships have changed and you need to immediately reflect those changes in Grafana without waiting for the automatic synchronization cycle. The operation requires admin privileges to execute and helps maintain consistency between the LDAP source of truth and Grafana's user database. operationId: postSyncUserWithLDAP parameters: - name: user_id in: path description: '' required: true schema: type: integer contentEncoding: int64 responses: '200': description: An OKResponse is returned if the request was successful. headers: {} content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false security: - basic: [] x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true /admin/ldap/{user_name}: parameters: [] get: tags: - Ldap summary: Grafana Get User From LDAP description: This API operation retrieves LDAP user information for a specific username from Grafana's admin interface. By making a GET request to the endpoint with a username parameter, administrators can query the LDAP directory to fetch detailed user data associated with that particular account. This is useful for verifying LDAP user configurations, troubleshooting authentication issues, or confirming user attributes before syncing them into Grafana. The operation requires admin-level permissions and returns user details such as name, email, groups, and other LDAP attributes configured in the Grafana LDAP integration settings. operationId: getUserFromLDAP parameters: - name: user_name in: path description: '' required: true schema: type: string responses: '200': description: An OKResponse is returned if the request was successful. headers: {} content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' '401': description: UnauthorizedError is returned when the request is not authenticated. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '403': description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' '500': description: InternalServerError is a general error indicating something went wrong internally. headers: {} content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' deprecated: false security: - basic: [] x-api-evangelist-processing: SplitPascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true components: schemas: 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.' SuccessResponseBody: title: SuccessResponseBody type: object properties: message: type: string securitySchemes: BearerAuth: type: http scheme: bearer description: Service account token or API key BasicAuth: type: http scheme: basic ApiKeyAuth: type: apiKey in: header name: Authorization description: 'Format: Bearer '