# Konsole: recordings

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

> 14 Operationen. Session recordings kept on the server: list, download, delete, legal holds, rules and storage.

Diese Routen liegen auf der Konsole, Port 3375. Sie nehmen ein API-Token als `Authorization: Bearer ndt_...`; siehe [API-Tokens](https://docs.neode.sk/de/command-line/api-tokens.md). Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

Session recordings kept on the server: list, download, delete, legal holds, rules and storage.

## GET /api/recordings

List recordings, newest first.

Only recordings of the devices the account sees; for an account limited to some devices a device_id outside them answers no rows.

Needs `recording.view`. `neodesk recordings list` calls it.

| Parameter | In | Type | What it is |
|---|---|---|---|
| `device` | query | string | Only devices whose ID or name contains this, ignoring case |
| `person` | query | string | Only recordings by accounts whose username contains this, ignoring case |
| `from` | query | string | Started on or after this date (2026-11-29) or RFC 3339 time |
| `to` | query | string | Started on or before this date or RFC 3339 time; a date counts to the end of that day (UTC) |
| `device_id` | query | string | Only this device |
| `session_id` | query | integer | Only this connection session, by its number |
| `held` | query | string, one of `true`, `false` | true: only recordings under a legal hold; false: only those without one |
| `limit` | query | integer | How many, 1 to 500; 100 when missing or out of range |
| `offset` | query | integer | Skip this many |

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.recordings` | array of [Recording](https://docs.neode.sk/de/development/api-reference/schemas.md#recording) | yes |  |
| `data.total` | integer | yes | How many match, without limit and offset |

| Error | When |
|---|---|
| 400 | from or to is not a date or time (code recording_bad_date), held is not true or false (code recording_bad_held), or session_id is not a number (code recording_bad_session) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 500 | Something failed on the server (the text of errors.server_error) |

## GET /api/recordings/rule

Show whether sessions to a device are recorded: off, on request or always, and where that comes from.

A device's own rule wins, then the strictest of its device groups' rules, then its organization's, then the server's, else on_request. When the organization's policy has Allow session recording off, mode is off with source policy, whatever the rules say.

Needs `device.connect or remote_target.connect or agent.terminal or cdap.terminal or mesh.terminal`. `neodesk recordings rule` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `device_id` | query | string | yes | The device or remote target (rt_...), at most 128 characters |

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.device_id` | string | yes |  |
| `data.mode` | string, one of `off`, `on_request`, `always` | yes |  |
| `data.source` | string, one of `device`, `group`, `org`, `server`, `default`, `policy` | yes | Where the mode comes from; default when no rule says |
| `data.source_id` | string |  | Only when set: the device, group or organization the mode comes from |
| `data.may_record` | boolean | yes | The person who connects may record: on_request or always |
| `data.must_record` | boolean | yes | Every session is recorded, and one that can't be doesn't start: always |
| `data.policy_forbids` | boolean | yes | The organization's policy has Allow session recording off |
| `data.retention_days` | integer | yes | How long the device's recordings are kept, 0 until someone deletes them |
| `data.watermark` | boolean | yes | The browser viewer draws the operator's name, the time and the device ID over the picture and into the recording |

| Error | When |
|---|---|
| 400 | device_id is missing or longer than 128 characters (code recording_device_missing) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or the account does not see the device |
| 404 | There is no such device (code recording_device_not_found) |
| 500 | Something failed on the server (the text of errors.server_error) |

## GET /api/recordings/rules

List the recording rules of the server, organizations, device groups and devices.

The widest scope first, then by scope_id.

Needs `recording.manage or recording.view`. `neodesk recordings rules` calls it.

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | [RecordingRules](https://docs.neode.sk/de/development/api-reference/schemas.md#recordingrules) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 500 | Something failed on the server (the text of errors.server_error) |

## PUT /api/recordings/rules

Set a recording rule: off, on request or always, the watermark, and for the server or an organization the retention in days.

Saving a rule replaces it: a value left out is taken from the wider rule. A rule without mode, watermark and retention_days is removed. A device's rule wins over its groups' (the strictest group wins), then its organization's, then the server's; the watermark is resolved the same way, and among groups on wins over off. Answers every rule, as GET does. Writes recording_rule_saved to the audit log.

Needs `recording.manage`. `neodesk recordings rule-set` calls it.

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `scope` | string, one of `server`, `org`, `group`, `device` | yes |  |
| `scope_id` | string |  | The organization ID, device group GUID or device ID; ignored for server, required otherwise |
| `mode` | string, one of `off`, `on_request`, `always` |  | Left out or empty: the rule sets no mode (the wider rule's applies) |
| `watermark` | string, one of `on`, `off` |  | Left out or empty: the wider rule's |
| `retention_days` | integer |  | Days to keep recordings, 0 until someone deletes them; for server and org only. Left out: the wider rule's; at least 0, at most 3650 |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | [RecordingRules](https://docs.neode.sk/de/development/api-reference/schemas.md#recordingrules) | yes |

| Error | When |
|---|---|
| 400 | The body is not JSON, or a field is not valid (code recording_bad_setting): a scope it doesn't know, no scope_id, a mode or watermark it doesn't know, or retention_days out of range or for a group or device |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 500 | Something failed on the server (the text of errors.server_error) |

## DELETE /api/recordings/rules/{scope}

Remove a recording rule: the wider rule applies again.

Removing a rule that doesn't exist is no error. Answers every rule, as GET /api/recordings/rules does. Writes recording_rule_deleted to the audit log.

Needs `recording.manage`. `neodesk recordings rule-delete` calls it. It cannot be undone.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `scope` | path | string, one of `server`, `org`, `group`, `device` | yes | What the rule is for |
| `scope_id` | query | string |  | The organization ID, device group GUID or device ID; ignored for server, required otherwise |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | [RecordingRules](https://docs.neode.sk/de/development/api-reference/schemas.md#recordingrules) | yes |

| Error | When |
|---|---|
| 400 | scope is not server, org, group or device, or scope_id is missing for org, group or device (code recording_bad_setting) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 500 | Something failed on the server (the text of errors.server_error) |

## GET /api/recordings/storage

Show where recordings are kept, the size cap and the usage, and try the storage.

Each call tries the storage with a write, a read and a delete; usage.storage_ok and usage.storage_error say how it went.

Needs `server.config`. `neodesk recordings storage` calls it.

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.settings` | [RecordingStorageSettings](https://docs.neode.sk/de/development/api-reference/schemas.md#recordingstoragesettings) | yes |  |
| `data.usage` | [RecordingUsage](https://docs.neode.sk/de/development/api-reference/schemas.md#recordingusage) | yes | With storage_ok and storage_error: the storage was tried for this answer |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 500 | Something failed on the server (the text of errors.server_error) |

## PUT /api/recordings/storage

Change where recordings are kept, encryption and the size cap.

Give only the settings that change; the others stay. Recordings that exist stay where they are. Switching to s3, and changing s3 or s3_secret while s3 is the storage, needs an endpoint, a bucket, an access key and a secret key, saved or in this body. Answers the settings and usage as GET does. Writes recording_storage_saved to the audit log, naming the settings that changed but never the secret.

Needs `server.config`. `neodesk recordings storage-set` calls it.

Request body, `application/json`:

| Field | Type | What it is |
|---|---|---|
| `storage` | string, one of `folder`, `s3` |  |
| `folder` | string | An absolute path; empty for the folder beside the database |
| `s3` | [RecordingS3](https://docs.neode.sk/de/development/api-reference/schemas.md#recordings3) | The bucket; replaces the saved one as a whole |
| `s3_secret` | string | The S3 secret key, stored encrypted with the recordings key; empty removes it |
| `encrypt` | boolean | Encrypt new recordings with the recordings key |
| `cap_bytes` | integer | The size cap in bytes, 0 for none; at least 0 |
| `warn_percent` | integer | Warn at this share of the cap; at least 1, at most 99 |

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.settings` | [RecordingStorageSettings](https://docs.neode.sk/de/development/api-reference/schemas.md#recordingstoragesettings) | yes |  |
| `data.usage` | [RecordingUsage](https://docs.neode.sk/de/development/api-reference/schemas.md#recordingusage) | yes | With storage_ok and storage_error: the storage was tried for this answer |

| Error | When |
|---|---|
| 400 | The body is not JSON, or a setting is not valid (code recording_bad_setting): storage not folder or s3, a folder that is not an absolute path, cap_bytes below 0, warn_percent out of range, an S3 bucket with s3.endpoint, s3.bucket, s3.access_key or s3.secret_key missing, or an s3_secret while the recordings key can't be read |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 500 | Something failed on the server (the text of errors.server_error) |

## POST /api/recordings/storage/check

Try the storage: write, read and remove a small file.

Tries the storage new recordings go to. A storage that fails the try still answers 200, with ok false and the reason.

Needs `server.config`. `neodesk recordings storage-check` calls it.

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.ok` | boolean | yes |  |
| `data.error` | string |  | Only when ok is false: why |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |

## GET /api/recordings/usage

Show what the recordings take on the storage against the size cap.

Does not try the storage, so storage_ok and storage_error are left out.

Needs `server.config or metrics.view or recording.view`. `neodesk recordings usage` calls it.

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | [RecordingUsage](https://docs.neode.sk/de/development/api-reference/schemas.md#recordingusage) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 500 | Something failed on the server (the text of errors.server_error) |

## GET /api/recordings/{id}

Show one recording.

A recording of a device that is gone shows only to accounts that see every device (super_admin, admin, global_admin, server_admin).

Needs `recording.view`. `neodesk recordings show` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The recording ID: 8 to 64 hex digits (see recordings list) |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object | yes |
| `data.recording` | [Recording](https://docs.neode.sk/de/development/api-reference/schemas.md#recording) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such recording, or the account does not see its device (code recording_not_found) |
| 500 | Something failed on the server (the text of errors.server_error) |

## DELETE /api/recordings/{id}

Delete a recording and its file.

A recording under a legal hold is refused until the hold is lifted. Writes recording_deleted to the audit log.

Needs `recording.delete`. `neodesk recordings delete` calls it. It cannot be undone.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The recording ID: 8 to 64 hex digits (see recordings list) |

**200**: Done (`application/json`)

[ConsoleSuccess](https://docs.neode.sk/de/development/api-reference/schemas.md#consolesuccess).

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such recording, or the account does not see its device (code recording_not_found) |
| 409 | The recording is under a legal hold (code recording_held) |
| 500 | Something failed on the server (the text of errors.server_error) |

## GET /api/recordings/{id}/download

Download a recording as a file (use --output).

Answers the file as an attachment named neodesk-&lt;device>-&lt;start time>.&lt;format>: WebM or MP4 video, or a terminal session as asciicast text. Takes Range requests. Each download writes recording_downloaded to the audit log.

Needs `recording.download`. `neodesk recordings download` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The recording ID: 8 to 64 hex digits (see recordings list) |

**200**: The file (`video/webm`, `video/mp4`, `application/x-asciicast`)

String (binary).

String (binary).

String (binary).

**206**: Part of the file, for a Range request (`video/webm`, `video/mp4`, `application/x-asciicast`)

String (binary).

String (binary).

String (binary).

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such recording, or the account does not see its device (code recording_not_found) |
| 416 | The range lies beyond the file |
| 500 | Something failed on the server (the text of errors.server_error) |
| 503 | The storage can't be read (code recording_storage_unreachable) |

## PUT /api/recordings/{id}/hold

Put a recording on legal hold, with a reason, or change the reason of a hold.

A held recording is kept past its retention and can't be deleted until the hold is lifted. Changing the reason also sets held_at, hold_by and hold_by_id anew. Writes recording_hold_set, or recording_hold_changed for a held recording, to the audit log with the reason.

Needs `recording.hold`. `neodesk recordings hold` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The recording ID: 8 to 64 hex digits (see recordings list) |

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `reason` | string | yes | Why the recording is held. Line breaks and runs of spaces become one space; at most 500 characters after that; at most 500 characters |

**200**: The recording with the hold (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object | yes |
| `data.recording` | [Recording](https://docs.neode.sk/de/development/api-reference/schemas.md#recording) | yes |

| Error | When |
|---|---|
| 400 | No reason, or one over 500 characters (code recording_hold_reason) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such recording, or the account does not see its device (code recording_not_found) |
| 500 | Something failed on the server (the text of errors.server_error) |

## DELETE /api/recordings/{id}/hold

Lift the legal hold of a recording: its retention applies again and it can be deleted.

Writes recording_hold_lifted to the audit log with the reason the hold had.

Needs `recording.hold`. `neodesk recordings release` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The recording ID: 8 to 64 hex digits (see recordings list) |

**200**: The recording without the hold (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object | yes |
| `data.recording` | [Recording](https://docs.neode.sk/de/development/api-reference/schemas.md#recording) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such recording, or the account does not see its device (code recording_not_found) |
| 409 | The recording has no legal hold (code recording_not_held) |
| 500 | Something failed on the server (the text of errors.server_error) |
