Export audit logs as CSV or JSONL according filter conditions
GET
/admin/audit-logs/export
const url = 'https://gitea.example.com/api/v1/admin/audit-logs/export';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.example.com/api/v1/admin/audit-logs/export \ --header 'Authorization: Basic <credentials>'Gitea Enterprise only. This endpoint is not part of the community edition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”q
string
Search keyword for operator name
operator_id
integer format: int64
ID of the operator to search for
action
string
Action to filter by, or a prefix of actions such as “repository:label”
operation_type
string
The name action had before, kept for existing scripts; an action, a prefix of actions or an old operation type
start_unix
integer format: int64
Start time in unix timestamp
end_unix
integer format: int64
End time in unix timestamp
format
string
Export format, either “csv” (default) or “jsonl”
Responses
Section titled “Responses”APIString is a string response
Media typeapplication/json
string
Examplegenerated
exampleAPIForbiddenError is a forbidden error response
Headers
Section titled “Headers”message
string
url
string