Data Sources
A data source tells a panel where to fetch its data. It holds a base URL and the credentials needed to call it. Panels reference a data source and add their own endpoint path, query parameters, and headers on top.
One data source can back many panels — define it once, reuse it everywhere.
What a data source holds
| Field | What it does |
|---|---|
| Name | A friendly label shown in the panel editor's "Data Source" dropdown. |
| Type | The kind of source. Currently REST API. |
| URL | The base URL every request is built from, e.g. https://metrics.example.com. |
| Auth type | How requests authenticate (see below). |
| API key | The secret used for authentication. Stored encrypted and never returned in responses. |
Authentication
Choose an "Auth type" when creating the data source:
| Auth type | Code | How the key is sent |
|---|---|---|
| Bearer token | BEARER | Authorization: Bearer <key> |
| API key header | API_KEY_HEADER | A custom header — default x-api-key, configurable. |
| None | NONE | No authentication. |
For API key header, set "API Key Header Name" if the upstream service expects something other than x-api-key (for example X-Api-Token).
How a panel uses it
When a panel loads, the request is assembled like this:
Code
So a data source with URL https://metrics.example.com and a panel with endpoint /api/v1/energy call https://metrics.example.com/api/v1/energy.
Time template variables
Endpoints and query values support time placeholders that resolve at request time:
| Variable | Resolves to |
|---|---|
{{now}} | Current timestamp. |
{{now-30d}} | 30 days ago (any Nd, Nh, Nm offset works). |
{{now:date}} | Current date in ISO format. |
Example endpoint:
Code
Configuration shape
Code
| Field | Type | Notes |
|---|---|---|
name | string | Required. |
type | enum | REST_API. |
url | string | Required, must be a valid URL. |
authType | enum | BEARER (default), API_KEY_HEADER, NONE. |
apiKeyHeaderName | string | Header name for API_KEY_HEADER. Default x-api-key. |
apiKey | string | Encrypted on save; never returned by the API. |
Next: point a Panel at this data source, then shape the response with Data Transformations.