Search audit logs according filter conditions
const url = 'https://gitea.example.com/api/v1/admin/audit-logs';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 \ --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”Search keyword for operator name
ID of the operator to search for
Operation type to filter by
Start time in unix timestamp
End time in unix timestamp
Page number of results to return (1-based)
Page size of results
Responses
Section titled “Responses”AuditLogList
object
Extra is the JSON-encoded extra payload
ID is the unique identifier for the audit log entry
IPAddress is the source IP address
Message is the localized message for the operation
OperationTime is when the audit action occurred
OperationType is the audit action type
OperatorID is the user ID that performed the operation
OperatorName is the username that performed the operation
OwnerID is the owner user/organization ID
OwnerName is the owner user/organization name
RepoID is the repository ID
RepoName is the repository name
TargetID is the target ID
TargetName is the target name
TargetType is the target type
Examplegenerated
[ { "extra": "example", "id": 1, "ip_address": "example", "message": "example", "operation_time": "2026-04-15T12:00:00Z", "operation_type": "example", "operator_id": 1, "operator_name": "example", "owner_id": 1, "owner_name": "example", "repo_id": 1, "repo_name": "example", "target_id": 1, "target_name": "example", "target_type": "example" }]APIForbiddenError is a forbidden error response