Audit
Audit log of write actions and undo support
Returns the caller's audit entries (newest first). Use action to filter to one action type and since to limit to entries on/after an RFC3339 timestamp.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Query Parameters
Exact action_type filter (e.g. match.apply, download.add)
Only entries created at or after this RFC3339 timestamp
date-timePage size (1-200, default 50)
1 <= value <= 20050Zero-based offset (default 0)
0 <= value0Response Body
application/json
curl -X GET "https://example.com/api/v1/audit"{ "items": [ { "id": "string", "user_id": "string", "token_id": "string", "agent_label": "string", "action_type": "string", "target_type": "string", "target_id": "string", "before_json": "string", "after_json": "string", "confidence": 0.1, "parent_id": "string", "dry_run": 0, "undone_at": "2019-08-24T14:15:22Z", "undone_by": "string", "created_at": "2019-08-24T14:15:22Z" } ], "limit": 0, "offset": 0}Reverses a single entry (when id is provided) or every entry created since the given timestamp. Set dry_run to preview without applying.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/audit/undo" \ -H "Content-Type: application/json" \ -d '{}'{ "items": [ { "audit_id": "string", "status": "reversed", "reason": "string" } ]}Returns the entry and any child entries written by macro execution. 403 if the entry belongs to another user.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/audit/string"{ "entry": { "id": "string", "user_id": "string", "token_id": "string", "agent_label": "string", "action_type": "string", "target_type": "string", "target_id": "string", "before_json": "string", "after_json": "string", "confidence": 0.1, "parent_id": "string", "dry_run": 0, "undone_at": "2019-08-24T14:15:22Z", "undone_by": "string", "created_at": "2019-08-24T14:15:22Z" }, "children": [ { "id": "string", "user_id": "string", "token_id": "string", "agent_label": "string", "action_type": "string", "target_type": "string", "target_id": "string", "before_json": "string", "after_json": "string", "confidence": 0.1, "parent_id": "string", "dry_run": 0, "undone_at": "2019-08-24T14:15:22Z", "undone_by": "string", "created_at": "2019-08-24T14:15:22Z" } ]}