/v1/audit-logsList audit logs
List audit logs for the current organization with filtering and pagination. Requires `audit:ListLogs` permission.
Query Parameters
actor_id
string<uuid>optionalquery
Filter by actor ID (user or service account)
actor_type
stringoptionalquery
Filter by actor type
Enum: "user", "service_account", "system"
action
stringoptionalquery
Filter by action (exact match or prefix with wildcard, e.g., "iam.*")
resource_type
stringoptionalquery
Filter by resource type
resource_id
stringoptionalquery
Filter by resource ID
status
stringoptionalquery
Filter by status
Enum: "success", "failure", "denied"
ip_address
stringoptionalquery
Filter by IP address
from
string<date-time>optionalquery
Filter logs from this timestamp (inclusive)
to
string<date-time>optionalquery
Filter logs until this timestamp (exclusive)
limit
integeroptionalquery
Maximum number of items to return
Default: 20
Example: 20
marker
string<uuid>optionalquery
ID of the last item from the previous page (for pagination)
Example: "550e8400-e29b-41d4-a716-446655440000"
Responses
List of audit logs
Content-Type: application/json
audit_logs
arrayoptionalmeta
objectoptionalAuthentication required or token invalid
Content-Type: application/json
error
objectrequiredInsufficient permissions
Content-Type: application/json
error
objectrequiredcurl -X GET "https://api.spo1.mycloud.com/v1/audit-logs" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json"
Response
List of audit logs
{"audit_logs": [{"id": "550e8400-e29b-41d4-a716-446655440000","timestamp": "2024-01-15T10:30:00Z","actor_id": "550e8400-e29b-41d4-a716-446655440000","actor_type": "user","actor_name": "string","actor_email": "string","organization_id": "550e8400-e29b-41d4-a716-446655440000","action": "iam.policy.create","status": "success","resource_type": "instance","resource_id": "string","resource_name": "string","ip_address": "192.168.1.100","user_agent": "string","request_id": "string","details": {},"error_code": "string","error_message": "string"}],"meta": {"total": 150,"limit": 20,"marker": "550e8400-e29b-41d4-a716-446655440000","has_more": true}}