跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 25.6.2, which is no longer the latest release. See the latest release.

Search audit logs according filter conditions

GET
/admin/audit-logs
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.

q
string

Search keyword for operator name

operator_id
integer format: int64

ID of the operator to search for

operation_type
string

Operation type to filter by

start_unix
integer format: int64

Start time in unix timestamp

end_unix
integer format: int64

End time in unix timestamp

page
integer

Page number of results to return (1-based)

limit
integer

Page size of results

AuditLogList

Media typeapplication/json
Array<object>
AuditLog represents an audit log entry.
object
extra

Extra is the JSON-encoded extra payload

string
id

ID is the unique identifier for the audit log entry

integer format: int64
ip_address

IPAddress is the source IP address

string
message

Message is the localized message for the operation

string
operation_time

OperationTime is when the audit action occurred

string format: date-time
operation_type

OperationType is the audit action type

string
operator_id

OperatorID is the user ID that performed the operation

integer format: int64
operator_name

OperatorName is the username that performed the operation

string
owner_id

OwnerID is the owner user/organization ID

integer format: int64
owner_name

OwnerName is the owner user/organization name

string
repo_id

RepoID is the repository ID

integer format: int64
repo_name

RepoName is the repository name

string
target_id

TargetID is the target ID

integer format: int64
target_name

TargetName is the target name

string
target_type

TargetType is the target type

string
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

Media typeapplication/json
message
string
url
string