Appearance
Compliance API
Audit logs, reports, and compliance management.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/compliance/audit-log | Query audit logs |
| POST | /v1/compliance/reports | Generate report |
| GET | /v1/compliance/reports/:id | Get report status |
| POST | /v1/compliance/holds | Create legal hold |
| DELETE | /v1/compliance/holds/:id | Release hold |
Query Audit Logs
bash
curl https://api.gateflow.ai/v1/compliance/audit-log \
-H "Authorization: Bearer gw_prod_..." \
-G -d "start=2024-01-01" -d "action=document.accessed"Parameters
| Parameter | Type | Description |
|---|---|---|
start | datetime | Start of period |
end | datetime | End of period |
action | string | Filter by action type |
actor | string | Filter by actor ID |
resource | string | Filter by resource ID |
Response
json
{
"events": [
{
"event_id": "evt_123",
"timestamp": "2024-01-15T10:30:00Z",
"action": "document.accessed",
"actor": {"id": "user_456"},
"resource": {"id": "doc_789"},
"hash": "sha256:..."
}
],
"pagination": {
"next_cursor": "abc123"
}
}Generate Report
bash
curl -X POST https://api.gateflow.ai/v1/compliance/reports \
-H "Authorization: Bearer gw_prod_..." \
-H "Content-Type: application/json" \
-d '{
"type": "hipaa_audit",
"period": {"start": "2024-01-01", "end": "2024-03-31"},
"format": "pdf"
}'Create Legal Hold
bash
curl -X POST https://api.gateflow.ai/v1/compliance/holds \
-H "Authorization: Bearer gw_prod_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Litigation 2024-001",
"scope": {
"documents": ["doc_123", "doc_456"],
"date_range": {"start": "2023-01-01"}
}
}'Next Steps
- Audit Trail - Logging details
- Reports - Report types