This is the programmatic path for applications. If you want a person to ask questions in chat, connect an AI assistant instead. If you want to author the queries this API runs, see Saved queries.
What it is
The Configview REST API lets your own applications — scripts, CI jobs, internal dashboards, scheduled audits — run your saved queries over HTTP and get JSON back. It reuses the exact same query engine that powers the dashboard, the Slack bot, and the AI connector, so a query behaves identically no matter which surface runs it. Calls are authenticated with a machine-to-machine API key, not a user login. Each key is minted by an admin and scoped to an explicit allowlist of queries — a key can only run the queries you granted it, and nothing else.| REST API (this page) | AI connector (MCP) | |
|---|---|---|
| Caller | Your applications / scripts | A person, through Claude / ChatGPT / Gemini |
| Auth | Long-lived API key (Authorization: Bearer …) | OAuth 2.1, per-user |
| Scope | Explicit per-key query allowlist | The curated catalog |
| Best for | Automation, CI, scheduled jobs, embedding | Ad-hoc questions in natural language |
Base URL
Every Configview customer has a dedicated API at:<your-subdomain> with whatever your team uses to log into the dashboard. If your dashboard is acme.configview.com, your API base URL is https://acme.configview.com/api/v1.
Authentication
Every request must send an API key as a Bearer token:cv_live_<prefix>_<secret>. The <prefix> is a short non-secret identifier shown in the admin UI so you can tell keys apart; the <secret> portion is shown only once, at creation.
A request with a missing or invalid key returns 401:
Create an API key
API keys are minted from the dashboard by an admin.Create a key
Click New key and fill in:
- Name — a label so you can recognize it later (e.g. “CI nightly SOC2 audit”).
- Allowed queries — search and select the saved queries this key may run. This is deny-by-default: a key with an empty allowlist can run nothing.
- Rate limit — maximum requests per minute for this key (default 60).
- Expiry (optional) — number of days until the key automatically stops working. Leave blank for a non-expiring key.
Endpoints
All endpoints are relative to your base URL and require theAuthorization header.
List queries
max_age_seconds is how long a cached result for that query stays fresh (see Caching). parameters describes any inputs the query accepts.
Get one query
403 query_not_in_scope if the key isn’t allowed to run it, or 404 query_not_found if no such query exists.
Run a query
| Field | Type | Default | Description |
|---|---|---|---|
params | object | {} | Values for the query’s parameters, keyed by parameter name. |
force_live | boolean | false | Bypass the cache and run against live data. |
columns and rows are positional — rows[i][j] is the value for columns[j]. When from_cache is false, the response includes run_duration_ms instead of cache_age_seconds and ran_at.
Caching
By default, running a query returns the most recent cached result if it’s still fresh — fast, and easy on your integrations. Each query defines its own freshness window (max_age_seconds).
from_cache: true— you got a stored result;cache_age_secondstells you how old it is.from_cache: false— the cache was empty or stale, so the query ran live.- Pass
"force_live": trueto always run against live data (slower; use it sparingly).
Rate limits
Each key has a per-minute request limit (default 60, set when the key is created). Exceeding it returns429:
Errors
All errors return a JSON body with anerror field and the appropriate HTTP status.
| Status | error | Meaning |
|---|---|---|
400 | params_must_be_object | params was sent but isn’t a JSON object. |
400 | invalid_parameters | A parameter value was missing or the wrong type. detail explains. |
401 | invalid_or_missing_api_key | No Authorization header, or the key is unknown / expired / revoked. |
403 | query_not_in_scope | The key is valid but not allowed to run this query. |
404 | query_not_found | No query exists for that seed_key (or it was deprecated). |
429 | rate_limit_exceeded | Per-minute limit for this key exceeded. |
500 | query_execution_failed | The query ran but errored. detail has the message. |
Call it from your application
Set the base URL and key once, then call the endpoints. Store the key in your secret manager or an environment variable — never hard-code it.Security best practices
Scope every key narrowly
Grant a key only the queries it needs. A CI audit key that runs three reports should be allowed exactly those three.
One key per consumer
Use a separate key per application or job. Revoking one then doesn’t disrupt the others, and the activity log attributes runs to the right caller.
Set an expiry
For temporary or contractor access, set an expiry so the key dies on its own even if no one remembers to revoke it.
Rotate by revoke-and-reissue
There’s no in-place rotation. To rotate, mint a new key, switch your app over, then revoke the old one.