Search the docs
Menu
Updated Edit on GitHub

Server API: audit

Copy as Markdown

These routes are on the server API, port 21114 (21121 in Docker). They take an API key in X-API-Key or a sign-in token; see The HTTP API.

The server's audit log, and the connection, file transfer and alarm records RustDesk clients send.

GET /api/audit

Show the 50 newest connection, file transfer and alarm records.

A record list that cannot be read comes back empty. The records are not narrowed to the devices the caller sees.

On the server API, port 21114. Needs audit.view.

200: The records (application/json)

Field Type
data object
data.connections array of AuditConnectionRecord
data.files array of AuditFileRecord
data.alarms array of AuditAlarmRecord
Error When
401 No credential, or one that is not valid
403 The credential's role lacks the permission

GET /api/audit/alarm

List the security alarms RustDesk clients reported.

The records are not narrowed to the devices the caller sees.

On the server API, port 21114. Needs audit.view.

Parameter In Type What it is
limit query integer How many records; default 100, at least 1, at most 500
offset query integer How many to skip; default 0, at least 0, at most 10000
host_id query string Only the records of this device
alarm_type query integer Only the alarms of this type

200: The records (application/json)

Field Type
data array of AuditAlarmRecord
total integer
Error When
401 No credential, or one that is not valid
403 The credential's role lacks the permission

GET /api/audit/conn

List the connections RustDesk clients reported.

The records are not narrowed to the devices the caller sees.

On the server API, port 21114. Needs audit.view.

Parameter In Type What it is
limit query integer How many records; default 100, at least 1, at most 500
offset query integer How many to skip; default 0, at least 0, at most 10000
host_id query string Only the records of this device
peer_id query string Only the records with this other side
action query string Only the records of this action, such as connect

200: The records (application/json)

Field Type
data array of AuditConnectionRecord
total integer
Error When
401 No credential, or one that is not valid
403 The credential's role lacks the permission

GET /api/audit/events

List the audit log, newest first.

The log keeps events for the retention days of the audit log. Without an audit log, enabled is false and events is empty.

On the server API, port 21114. Needs audit.view.

Parameter In Type What it is
limit query integer How many events; default 50, at most 1000
offset query integer How many to skip; default 0, at least 0
action query string Only the events of this action, such as peer_banned

200: The events (application/json)

Field Type What it is
enabled boolean
total integer How many events match
count integer How many are in this page
events array of AuditEvent or null
Error When
401 No credential, or one that is not valid
403 The credential's role lacks the permission

GET /api/audit/file

List the file transfers RustDesk clients reported.

The records are not narrowed to the devices the caller sees.

On the server API, port 21114. Needs audit.view.

Parameter In Type What it is
limit query integer How many records; default 100, at least 1, at most 500
offset query integer How many to skip; default 0, at least 0, at most 10000
host_id query string Only the records of this device
peer_id query string Only the records with this other side

200: The records (application/json)

Field Type
data array of AuditFileRecord
total integer
Error When
401 No credential, or one that is not valid
403 The credential's role lacks the permission

Type to search pages, sections, commands and settings.