Skip to content
GitmoapAPIBeta
Schema

AuditRecord

One audit record. Records are hash-chained and append-only: never updated or deleted, so any tampering shows when the chain is verified.

Shape

  • actorAuditActor
    • The AuditActor schema
    • actor_typestringWhat kind of caller acted: user, service_account, pipeline_run, anonymous, or scim — an organization's identity provider calling with its SCIM token.
    • auth_methodAuthMethodjwtaccess_tokenanonymousHow the caller authenticated.
    • idstringThe id of the user, service account or pipeline run that acted, or anonymous.
    • avatar_urlstring or nulloptional
    • emailstringoptional
    • token_idstring or nulloptional
    • usernamestringoptional
  • audit_idAuditId (string · uuid)
  • categoryAuditCategorymutationauth_eventsensitive_readWhat kind of operation the record captures.
  • hashstringSHA256(canonical_json(record without hash) ‖ prev_hash), hex.
  • http_methodstring
  • monthstringThe month the record belongs to, YYYY-MM. Each month's records form one segment of the chain.
  • occurred_atstring
  • operation_idstring
  • outcomeAuditOutcomesuccessdeniedfailureThe result of the audited operation.
  • prev_hashstringHash of the previous record in the chain (genesis = 64 zeros; first of a month links to the prior month's tip).
  • recorded_atstringWhen the record was written to the log, RFC 3339 with microseconds.
  • request_idstring
  • routestring
  • scopestringWhich audit chain the record belongs to — an organisation, a user, or the platform.
  • seqinteger · int640–∞Monotonic position within (scope, month).
  • status_codeinteger · int320–∞
  • accessAccessAuditDetail or nulloptionalFor an operation that changed who can do what: each grant it made, changed or revoked, with the role before and after. Absent everywhere else — and absent fields do not enter the hash, so every record written before this field existed verifies unchanged.
    • The AccessAuditDetail schema
    • changesarray of AccessAuditChange
      • The AccessAuditChange schema
      • grant_idGrantId (string · uuid)
      • sensitivebooleanWhether either role carries a sensitive or reserved permission.
      • subjectSubjectRef
      • afterRoleRef or nulloptionalThe role after the change. Absent for a revoked grant.
      • beforeRoleRef or nulloptionalThe role before the change. Absent for a new grant.
    • inheritanceInheritanceAuditChange or nulloptionalA scope's inheritance switched.
    • limitLimitAuditChange or nulloptionalA limit set or removed.
    • roleRoleAuditChange or nulloptionalA custom role's permissions changing — which changes access wherever the role is granted, without any grant changing.
      • The RoleAuditChange schema
      • grants_affectedinteger · int64
      • limits_affectedinteger · int64
      • permissions_addedarray of string
      • permissions_removedarray of string
      • role_idRoleId (string · uuid)
  • mcpMcpAuditDetail or nulloptionalFor a request an AI agent made through the MCP server: the tool and the client. Absent everywhere else, and so outside the hash of every record that does not carry it.
    • The McpAuditDetail schema
    • toolstringThe tool whose execution made the request.
    • clientstring or nulloptionalThe client application the tool call came from, as that application named itself.
    • oauth_client_idstring or nulloptionalThe app the access token was issued to, when an app connected through sign-in — its own registered identifier, which, unlike the self-reported client name, the person consented to.
  • resource_bindingstring or nulloptional
  • source_ipstring or nulloptional
  • target_idstring or nulloptional
  • target_typestring or nulloptional
  • user_agentstring or nulloptional

Example

Synthesized example
{
"actor": {
"actor_type": "actor-type-a8cd",
"auth_method": "jwt",
"id": "id-bf3d",
"avatar_url": "https://gitmoap.example/acme/1f243e07",
"email": "tomas@acme.example",
"token_id": "b238d0bd-94ff-42ee-be17-8ce3b9e54c38",
"username": "lin"
},
"audit_id": "861c730c-07ca-4164-83b6-146d431133d1",
"category": "mutation",
"hash": "hash-9122",
"http_method": "http-method-6211",
"month": "month-ad49",
"occurred_at": "2026-10-11T03:40:32Z",
"operation_id": "2312be81-3729-49f5-a63b-d86501fd293c",
"outcome": "success",
"prev_hash": "prev-hash-ba84",
"recorded_at": "2026-10-12T02:26:57Z",
"request_id": "b292bb79-8bdd-4d65-857d-07098c43e4f5",
"route": "route-727c",
"scope": "scope-fa24",
"seq": 8,
"status_code": 50,
"access": {
"changes": [
{
"grant_id": "764ded44-fa12-4f2e-ba33-014c725e9894",
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
"sensitive": false,
"subject": {
"principal": "22d08ad6-cbfb-4b05-bc58-db2398500ee8"
}
},
{
"grant_id": "84e8a585-5fc5-436b-9e32-3fefd926c181",
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
"sensitive": false,
"subject": {
"principal": "c97a84db-d26a-4221-a78f-62792a095445"
}
}
],
"inheritance": {
"inherits_access": false,
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
},
"limit": {
"ceiling": {
"builtin": "guest"
},
"limit_id": "f06d752b-0f71-4e5c-b7f8-d5de34bf7a19",
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
"set": false,
"subject": {
"principal": "eb43f017-34b1-4f93-a8f1-dd37c3c033fa"
}
},
"role": {
"grants_affected": 13,
"limits_affected": 69,
"permissions_added": [
"permissions-added-9771"
],
"permissions_removed": [
"permissions-removed-f679"
],
"role_id": "e06f745a-25a0-482a-8105-ac87b0cb8d4c"
}
},
"mcp": {
"tool": "tool-7796",
"client": "client-30d9",
"oauth_client_id": "b869ff36-1fa3-43b8-9f6e-d26b96c5923b"
},
"resource_binding": "resource-binding-1d1a",
"source_ip": "source-ip-42bc",
"target_id": "93a0d76a-951e-4ca0-a68c-06b606de6399",
"target_type": "target-type-38bc",
"user_agent": "user-agent-b810"
}

Graph

Used by