Log
List
nil for no filters.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Log and query tamper-evident audit entries
entry, err := client.Audit.Log(ctx, grantex.LogAuditParams{
AgentID: "ag_01HXYZ...",
AgentDID: "did:grantex:ag_01HXYZ...",
GrantID: "grnt_01HXYZ...",
PrincipalID: "user_123",
Action: "email:read",
Status: "success",
Metadata: map[string]interface{}{"messageId": "msg-123"},
})
result, err := client.Audit.List(ctx, &grantex.ListAuditParams{
AgentID: "agent-id",
PrincipalID: "user-123",
Action: "email:read",
})
for _, e := range result.Entries {
fmt.Printf("[%s] %s: %s\n", e.Timestamp, e.Action, e.Status)
}
nil for no filters.
entry, err := client.Audit.Get(ctx, "entry-id")
AuditEntry| Field | Type | Description |
|---|---|---|
EntryID | string | Entry ID |
AgentID | string | Agent ID |
AgentDID | string | Agent DID |
GrantID | string | Grant ID |
PrincipalID | string | User ID |
DeveloperID | string | Owner developer ID |
Action | string | Action performed |
Metadata | map[string]interface{} | Custom metadata |
Hash | string | Entry hash (chain integrity) |
PrevHash | *string | Previous entry hash |
Timestamp | string | ISO 8601 timestamp |
Status | string | "success", "failure", "blocked" |