API overview
The AuditGraph API is read-only. It is built for dashboards, SIEMs, BI tools and automation.
Every endpoint is listed in the Endpoint reference, generated from the OpenAPI
3.1 document AuditGraph publishes at /v1/openapi.json.
One endpoint takes a POST and still changes nothing: the
pre-change impact check models a planned change and stores only an
audit entry. It is not in the OpenAPI document.
- Access
- Read-only
- Authentication
- API key in
X-API-KeyorAuthorization: Bearer - Base path
/v1on the host you sign in to- Rate limit
- 600 requests per minute per key
Authenticate
Section titled “Authenticate”Create an API key under Administration › API & Exports. Send it in either header:
GET /v1/summary HTTP/1.1Host: <your AuditGraph host>X-API-Key: ag_xxxxxxxxxxxxxxxxAuthorization: Bearer ag_xxxxxxxxxxxxxxxxUse the same host you sign in to. A key sees only what its role and directory scope allow.
Read completeness — never treat null as 0
Section titled “Read completeness — never treat null as 0”Every answer is computed at one publication and says so.
| Field | Meaning |
|---|---|
as_of_pub, published_at |
The snapshot the answer was computed from, and when it was published. Pass as_of_pub to keep paging within one snapshot. |
displayability |
How complete the evidence is: COMPLETE, PARTIAL, UNKNOWN, STILL_PROCESSING. |
null value |
AuditGraph cannot evidence this value. It is not zero. |
Paging
Section titled “Paging”Lists return items and an opaque next_cursor.
- Send the first request without
cursor. You can addlimit. - Pass the returned
next_cursorback ascursorto get the next page. - Stop when
next_cursoris empty.
import requests
HOST, KEY = "https://<your AuditGraph host>", "ag_..."cursor, rows = None, []while True: r = requests.get(f"{HOST}/v1/identities", headers={"X-API-Key": KEY}, params={"cursor": cursor} if cursor else {}, timeout=30) r.raise_for_status() body = r.json() rows += body["items"] cursor = body.get("next_cursor") if not cursor: breakCaching
Section titled “Caching”Answers carry Cache-Control: no-store.
GET /v1/export/snapshot supports If-None-Match. It returns 304 Not Modified until the next
publication, so you can poll it cheaply.
Limits and errors
Section titled “Limits and errors”| Status | Cause | Fix |
|---|---|---|
429 |
Over 600 requests per minute per key. | Retry after the time in the Retry-After header. |
401 |
Missing, expired or revoked key. | Send a valid key. See API keys. |
403 |
The key’s role or scope does not allow the endpoint. | Use a key whose role and scope include the endpoint. |
Versioning
Section titled “Versioning”The path prefix is /v1. Breaking changes get a new prefix. Additive fields can appear at any
time, so ignore fields you do not know.