Authentication API
The Grafana API supports multiple authentication methods for secure access to API endpoints.Authentication Methods
Grafana supports the following authentication methods:- Basic Authentication - Username and password
- API Keys - Token-based authentication
- Session Cookies - Browser-based authentication
Basic Authentication
Use HTTP Basic Authentication with your Grafana username and password:Security Definitions
basic
HTTP Basic Authentication using username and password
API Key Authentication
API keys provide a secure way to authenticate API requests without exposing user credentials.Security Definitions
apiKey
API Key authenticationLocation: Header
Name:
Format:
Name:
AuthorizationFormat:
Bearer <api-key>Using API Keys
Include the API key in theAuthorization header:
Session Authentication
Login
string
required
Username or email address
string
required
User password
string
Login success message
Logout
User Auth Tokens
Get Auth Tokens
Get all auth tokens for the current user.integer
Token ID
boolean
Whether the token is currently active
string
IP address of the client
string
Token creation timestamp (ISO 8601)
Revoke Auth Token
Revoke a specific auth token.integer
required
ID of the auth token to revoke