Authentication
This guide explains how to authenticate with your Logit.io Grafana instance for programmatic access via the Grafana HTTP API.
Finding Your Credentials
Your Grafana API credentials are available in your Logit.io dashboard:
- Navigate to your Profile Settings (opens in a new tab)
- Locate the Proxy Settings section
- You'll find three authentication options:
- Username and Password - For basic authentication
- Basic Auth Header - Pre-encoded Base64 header for convenience
Authentication Methods
Method 1: Basic Auth Header
The simplest approach is using the pre-encoded Basic Auth header. This is already Base64 encoded and ready to use:
curl -XGET -H "Content-Type: application/json" \
-H "Authorization: Basic @proxyAuthSetting.basicAuthHeader" \
"https://grafana.logit.io/s/@metrics_id/api/health"Method 2: Username and Password
Alternatively, you can use the username and password directly. Most HTTP clients will handle the Base64 encoding for you:
curl -XGET -H "Content-Type: application/json" \
-u "@proxyAuthSetting.username:@proxyAuthSetting.password" \
"https://grafana.logit.io/s/@metrics_id/api/health"Base URL Pattern
All Grafana API requests use the following base URL pattern:
https://grafana.logit.io/s/@metrics_id/api/Common API endpoints include:
| Endpoint | Description |
|---|---|
/api/health | Health check |
/api/search | Search dashboards and folders |
/api/dashboards/uid/{uid} | Get dashboard by UID |
/api/dashboards/db | Create/update dashboard |
/api/folders | List/create folders |
Verify Your Connection
Run the health check command above to verify your credentials are working. A successful response looks like:
{
"commit": "abc123",
"database": "ok",
"version": "10.0.0"
}Using Credentials in Different Tools
Each guide in this section shows how to use your credentials with specific tools:
| Tool | Authentication Method |
|---|---|
| Terraform | Basic Auth Header via provider config |
| Python | Username/Password via grafana-client |
| cURL | Basic Auth Header or -u flag |
Further Reading
For a complete list of available API endpoints, see the official Grafana HTTP API documentation (opens in a new tab).