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:

  1. Navigate to your Profile Settings (opens in a new tab)
  2. Locate the Proxy Settings section
  3. 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:

⚠️
You will need to update any placeholder variables with your Stack and Proxy Auth details.
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:

EndpointDescription
/api/healthHealth check
/api/searchSearch dashboards and folders
/api/dashboards/uid/{uid}Get dashboard by UID
/api/dashboards/dbCreate/update dashboard
/api/foldersList/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:

ToolAuthentication Method
TerraformBasic Auth Header via provider config
PythonUsername/Password via grafana-client
cURLBasic 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).