# Server-API: audit

Quelle: https://docs.neode.sk/de/development/api-reference/server-audit/
Zuletzt geändert: 2026-12-03

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

Diese Routen liegen auf der Server-API, Port 21114 (21121 in Docker). Sie nehmen einen API-Schlüssel in `X-API-Key` oder ein Anmelde-Token; siehe [Die HTTP-API](https://docs.neode.sk/de/development/api.md#signing-in). Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

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](https://docs.neode.sk/de/development/api-reference/schemas.md#auditconnectionrecord) |
| `data.files` | array of [AuditFileRecord](https://docs.neode.sk/de/development/api-reference/schemas.md#auditfilerecord) |
| `data.alarms` | array of [AuditAlarmRecord](https://docs.neode.sk/de/development/api-reference/schemas.md#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](https://docs.neode.sk/de/development/api-reference/schemas.md#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](https://docs.neode.sk/de/development/api-reference/schemas.md#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](https://docs.neode.sk/de/development/api-reference/schemas.md#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](https://docs.neode.sk/de/development/api-reference/schemas.md#auditfilerecord) |
| `total` | integer |

| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
