List audit

The compliance read of the SHARED tamper-evident audit plane — the SOC 2 posture surface (privileged actions: who started/decided what, when).

GET /v1/compliance/audit

Addresshttps://api.hanzo.ai/v1/compliance/audit
MethodGET
Operationget_compliance_audit
AuthAuthorization: Bearer $HANZO_API_KEY

The compliance read of the SHARED tamper-evident audit plane — the SOC 2 posture surface (privileged actions: who started/decided what, when). The org is PINNED to the caller's validated org and the rows are narrowed to compliance.* actions. Fail-closed: no principal is a 401, no configured audit store a 501.

Request

1 field.

FieldInTypeRequiredDescription
resultquerystring—Result filters rows by outcome result: success, deny, or error; empty means all.

Response

StatusBodyMeaning
200compliance.auditListok
defaultproblem-detailsrefused

200 body — 25 fields.

FieldInTypeAlwaysDescription
databodycompliance.Wire[]—Data is the org's compliance.* audit rows, newest first.
data[].actionbodystring—Action is the verb that was performed.
data[].afterbodyany—After is the changed thing as the action left it, redacted the same way.
data[].authMethodbodystring—Auth is the credential the actor presented: "jwt", "api-key", or "none".
data[].beforebodyany—Before is the changed thing as it stood before the action, as JSON, with every secret-shaped field already redacted.
data[].emailbodystring—Email is the actor's validated address, absent when the credential carried none.
data[].hashbodystring—Hash is this record's SHA-256 over its own canonical JSON with both hash fields cleared, folded with prevHash.
data[].homebodystring—Home is present ONLY on a cross-org action: the org the actor came FROM, while Org is the org they acted IN.
data[].isAdminbodyboolean—IsAdmin is the VALIDATED platform-SuperAdmin bit at decision time (owner == "admin", principal.Super), never the client's own claim to be one.
data[].methodbodystring—Method is the HTTP verb, on a record a request produced.
data[].orgbodystring—Org is the tenant the action was taken IN — the effective org, which for everyone but an impersonating SuperAdmin is also the actor's own.
data[].pathbodystring—Path is the request's route.
data[].prevHashbodystring—PrevHash is the hash of record seq-1, which is what links the rows into a chain: a deleted or reordered record breaks the recomputation at that point.
data[].reasonbodystring—Reason is a short explanation for a deny or an error ("SuperAdmin required", "insufficient_balance").
data[].requestIdbodystring—RequestID ties this row to the request-line log and any downstream trace — the X-Request-Id the pipeline minted for that request.
data[].resourcebodystring—Resource is the KIND of thing acted upon ("org", "role", "secret", "provider-config", "credit").
data[].resourceIdbodystring—ResourceID is the specific instance, absent when the kind alone identifies it.
data[].resultbodystring—Result is how the action ended: "success", "deny" or "error".
data[].seqbodyinteger (uint64)—Seq is the record's position in the chain, 0-based and gapless.
data[].sourceIpbodystring—SourceIP is the client address the edge resolved for the request, after the proxy chain — the address a responder would act on, not the socket peer.
data[].statusbodyinteger (int64)—Status is the HTTP status the caller received.
data[].subbodystring—Sub is the acting user (the IAM subject).
data[].timebodystring—Time is when the action happened, RFC3339Nano in UTC.
data[].userAgentbodystring—UserAgent is the client the request announced itself as.
disclaimerbodystring—Disclaimer states that statuses are provider-reported or tracked, never a platform assertion of legal or regulatory compliance.

Failure carries the platform error shape — see Errors.

Examples

hanzo compliance audit
import { Configuration, ComplianceApi } from 'hanzoai';

const api = new ComplianceApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getComplianceAudit();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ComplianceApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ComplianceApi(client).get_compliance_audit()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ComplianceAPI.GetComplianceAudit(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, compliance_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = compliance_api::get_compliance_audit(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ComplianceApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ComplianceApi(client).getComplianceAudit();
curl https://api.hanzo.ai/v1/compliance/audit \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool compliance, op get_compliance_audit — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "compliance",
         "arguments": {
           "op": "get_compliance_audit",
           "input": {}
         }
       }
     }'

Compliance API · All Hanzo APIs · Interactive reference

Was this page useful?