API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsExport all audit logs

Export all audit logs

GET /api/audit_logs/export

GET /api/audit_logs/export

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Query Parameters

event_type?string

The event type. Event types can be looked up using the /api/audit_logs/event_types endpoint.

operator_id?string

The user ID of the operator.

gateway_group_id?string

Gateway group ID.

Length1 <= length
resource_id?string

The resource ID.

start_at?integer

Start at timestamp to filter the audit logs.

end_at?integer

End at timestamp to filter the audit logs.

format*string

Format to export.

Value in

  • "json"
  • "csv"

Response Body

curl -X GET "$API_BASE_URL/api/audit_logs/export?event_type=AddConsumerCredential&format=json"

Successfully exported audit logs in the requested format.

Complete operation details and schema variants

GET /api/audit_logs/export

Export all audit logs

Export audit logs that match the specified filters into a downloadable file format for compliance, archival, or external analysis. Apply event, operator, resource, and time-range filters before export to control data scope.

Required IAM Permission: Action iam:ExportAudits, Resource arn:api7:iam:organization/*

Parameters

  • event_type (query, string, optional): The event type. Event types can be looked up using the /api/audit_logs/event_types endpoint.
  • operator_id (query, string, optional): The user ID of the operator.
  • gateway_group_id (query, string, optional): Gateway group ID.
  • resource_id (query, string, optional): The resource ID.
  • start_at (query, integer, optional): Start at timestamp to filter the audit logs.
  • end_at (query, integer, optional): End at timestamp to filter the audit logs.
  • format (query, string, required): Format to export.

Responses

  • 200: Successfully exported audit logs in the requested format.

cURL

curl -X GET '$API_BASE_URL/api/audit_logs/export'