Skip to content

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-Key or Authorization: Bearer
Base path
/v1 on the host you sign in to
Rate limit
600 requests per minute per key

Create an API key under Administration › API & Exports. Send it in either header:

GET /v1/summary HTTP/1.1
Host: <your AuditGraph host>
X-API-Key: ag_xxxxxxxxxxxxxxxx
Authorization: Bearer ag_xxxxxxxxxxxxxxxx

Use 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.

Lists return items and an opaque next_cursor.

  1. Send the first request without cursor. You can add limit.
  2. Pass the returned next_cursor back as cursor to get the next page.
  3. Stop when next_cursor is 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:
break

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.

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.

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.