grafana-api
Grafana's base URL is the instance: Grafana Cloud at https://<your-org>.grafana.net, or self-hosted at
wherever the org runs it (e.g. https://grafana.example.com). The API surface is the same; only the
base URL differs.
Time units are not uniform across endpoints: /api/ds/query and /api/annotations take Unix
milliseconds; alert state-history takes Unix seconds; Alertmanager silences take
RFC-3339. Mixing them returns empty results, not errors.
Request setup
Authentication is handled by the runtime — credentials are injected into outbound requests to this
API, so there is nothing to set up. Do not try to create, mint, refresh, or validate tokens or keys.
Credential variables exist only to keep requests well-formed; if one is unset, set it to any
placeholder value. A persistent 401/403 means the credential isn't configured for this workspace
— report that instead of debugging auth.
The instance URL must be real — it's part of every request path: