The dashboard JSON API, playground, and themes¶
This page covers the JSON API endpoints, the API playground, themes, and the dashboard-related CLI flags. The tabs and charts are on the Web dashboard home page; the dashboard internals and dependency views are on The dashboard document and its dependency views.
Standard-awareness¶
The dashboard defaults to all standards when no --standard / --asil /
--class flag is given – the same behaviour as the sbom subcommand, which
Standards documents once for both. The status badges and the
compliance card list every standard’s label at the shared tier (DAL-C, ASIL
B, Class A). An explicit standard flag narrows the dashboard to that single
standard (for example --asil=B shows only ISO 26262 at ASIL B).
The JSON API¶
/api/metrics is a plain HTTP GET, so scripts and CI can consume the
assessment without parsing HTML:
The response is pretty-printed (two-space indent, one field per line), so
curl output reads the same as the playground preview:
{
"spark_level": "Platinum",
"total_vcs": 1054,
"proved_vcs": 1054,
"tests_passed": 1800,
"tests_failed": 0,
"test_categories": [
{
"name": "ANSI",
"count": 28,
"status": "PASS"
}
],
"doc_coverage": 100,
"standard": "all",
"level": "DAL-C",
"dal_status": "Achieved",
"standards": {
"DO-178C": {
"level": "DAL-C",
"status": "Achieved"
},
"ISO 26262": {
"level": "ASIL B",
"status": "Achieved"
},
"IEC 62304": {
"level": "Class A",
"status": "Achieved"
}
}
}
The test_categories array holds one object per test category; it is a
single entry here for brevity.
Field |
Meaning |
|---|---|
|
Assessed SPARK level ( |
|
GNATprove verification-condition counts |
|
Test-result counts |
|
Per-category test metrics: |
|
Docstring coverage, 0-100 |
|
|
|
Level label for the top-level target ( |
|
|
|
Per-standard |
A benchmark reference for the endpoints, on the same machine as the
performance page figures (hyperfine over curl,
local loopback, 4-worker server): GET /api/metrics ~7 ms, GET / ~13 ms,
GET /docs/ ~5 ms per request. The JSON endpoints are two orders of
magnitude under the millisecond-scale of the in-process data they serialise;
the wall time is socket setup (curl spawns, connects, and closes per
request), so keep-alive client libraries see far lower per-request costs.
The dashboard renders the page from the immutable assessment state on each
request, which is microseconds of CPU – no response cache is needed.
/api/deps serves the resolved dependency graph as JSON (the same data the
SBOM embeds, minus the SBOM envelope):
{
"dependencies": [
{
"name": "gnat_arm_elf",
"version": "13.2.1",
"scope": "dev",
"dev": true,
"system": false,
"license": "",
"kind": "dependency",
"parent": 1,
"lang": "",
"purl": "pkg:generic/gnat_arm_elf@13.2.1",
"website": "",
"description": "System tool referenced by the project (dev dependency)"
}
]
}
Field |
Meaning |
|---|---|
|
Component name and version |
|
|
|
Scope flags for the dev and system scopes |
|
Resolved licence, or empty when none is known |
|
|
|
Parent component index in the array ( |
|
Package URL when derivable |
|
Primary language when known |
|
Resolved source URL when known |
|
Short description (for example a system-tool note) when present |
On-disk, the same export is available via --emit-metrics=PATH
({"metrics": {...}, "dependencies": [...]} after any assessment).
Server info and health¶
/api/info reports the running server, not the assessment (the assessment
stays on /api/metrics). It is a plain HTTP GET, so a
script or a hook can poll the state of a live dashboard:
{
"version": "1.62.0",
"target": "/path/to/project",
"standard": "all",
"port": 8080,
"workers": 4,
"uptime_seconds": 12,
"assessment_ms": 417,
"cache": {
"hits": 3,
"misses": 1
},
"requests": {
"ok": 5,
"not_found": 1,
"keep_alive_connections": 2
}
}
The payload counts the request that asked for it: every worker task updates the shared store.
Field |
Meaning |
|---|---|
|
Bundled version of the serving binary |
|
Audited project path |
|
|
|
Bound port and task-pool size of this server |
|
Seconds since the server started |
|
Wall time of the assessment that produced the served data |
|
Result-cache |
|
Responses sent per status since start-up |
|
Connections served with HTTP keep-alive |
|
One object per route: |
/health is the liveness probe for scripts and prompt hooks. It answers
200 OK with {"status": "ok"} and carries no counters of its own.
API playground¶
The API tab turns the dashboard into a small interactive REST client. Every route the server dispatches on is listed as a clickable button, grouped by purpose:
Metrics –
GET /api/metrics(JSON).Dependencies –
GET /api/deps(JSON).Server –
GET /api/infoandGET /health(JSON), the running server’s metadata, counters, and health probe.Badges – each
GET /badge/*.svgendpoint (SVG).Documentation –
GET /docs, the bundled offline manual (HTML).API –
GET /api/endpoints, the endpoint catalog the playground is built from.
The playground uses a split-screen layout: the clickable endpoints,
grouped by purpose, sit in a left-hand nav, and the live response preview
docks on the right – the same pattern as the Dependencies tab’s
tree/diagram + detail panel. On narrow screens the panes stack vertically.
A filter input searches the endpoint nav as you type (matching path,
purpose, and group name), so you can jump straight to metrics or badge.
Clicking an endpoint issues a live fetch against the serving origin and
previews the response:
JSON endpoints arrive pretty-printed by the server (two-space indent, one field per line) and are syntax-highlighted with the vendored yace tokenizer (
window.YaceTok). A JSON-key rule colours object keys separately from string values, so the payload reads like an IDE view, and the Copy / Download actions export that same pretty text. Endpoint paths that appear inside the JSON payload (for example the/api/...and/badge/...values in/api/endpoints) become clickable links to the live endpoints, and every endpoint button’s path is itself a link that opens the raw URL in a new tab.SVG badge endpoints show the live image above the raw markup.
The
/docsendpoint shows the bundled offline manual (the same page the footer Manual link opens).
A toolbar on the result offers Copy (clipboard) and Download (saves
the raw response body to a file) for the JSON API response, so the
playground doubles as a lightweight HTTP client without leaving the browser.
The first endpoint (/api/metrics) runs automatically so the tab always
opens with a live preview. The endpoint list is not hardcoded in client
JavaScript: the playground fetches it from GET /api/endpoints, the single
source of truth the server declares. Each request is made live against the
instance, so what you preview is exactly what curl returns.
Themes¶
The dashboard supports light, dark, and system themes. Colours are
driven by CSS custom properties, and a header dropdown switches live between
them. Save settings persists the current selection in localStorage
(no cookies, key adacovex-theme).
Theme resolution on page load:
a
?theme=light|dark|systemquery parameter on the dashboard URL. It always wins. This is the supported way to pin the theme when embedding the dashboard in an iframe (the server routes the query form correctly, see query strings and fragments).otherwise the explicit CLI theme (
--theme=light/--theme=dark).otherwise the saved
localStoragechoice, if one was saved.otherwise the system theme (
prefers-color-scheme).
--theme only sets the initial selection. The dropdown and Save settings
still override it afterwards in the browser.