# Server API: remote targets

Source: https://docs.neode.sk/development/api-reference/server-remote-targets/
Last updated: 2026-12-03

> 12 operations. RDP and VNC endpoints the server reaches through guacd: the targets, their saved sign-in, trusted certificates and the session tunnel.

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](https://docs.neode.sk/development/api.md#signing-in).

RDP and VNC endpoints the server reaches through guacd: the targets, their saved sign-in, trusted certificates and the session tunnel.

## GET /api/remote-targets

List remote targets.

The route does not check the caller's organization or device scope.

On the server API, port 21114. Needs `remote_target.view`.

| Parameter | In | Type | What it is |
|---|---|---|---|
| `org_id` | query | string | Only the targets of this organization |
| `include_disabled` | query | string, one of `true`, `false` | true to list turned-off targets too; default `"false"` |

**200**: The targets (`application/json`)

| Field | Type |
|---|---|
| `targets` | array of [RemoteTarget](https://docs.neode.sk/development/api-reference/schemas.md#remotetarget) |

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

## POST /api/remote-targets

Add an RDP or VNC target.

Takes a body of at most 32 kB. created_at and updated_at in the answer are 0001-01-01T00:00:00Z; read the target again for the real times.

On the server API, port 21114. Needs `remote_target.edit`.

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `name` | string | yes | at most 160 characters; at most 160 characters |
| `protocol` | string, one of `rdp`, `vnc` | yes |  |
| `host` | string | yes | a host name or IP address, at most 253 characters, without spaces or slashes; at most 253 characters |
| `port` | integer | yes | at least 1, at most 65535 |
| `platform` | string |  |  |
| `username` | string |  |  |
| `credential_mode` | string, one of `saved`, `prompt`, `none` |  | prompt when missing |
| `tls_mode` | string, one of `required`, `preferred`, `disabled` |  | preferred when missing |
| `cert_fingerprint` | string |  | the certificate fingerprint to trust, at most 128 characters; at most 128 characters |
| `org_id` | string |  | the organization the target belongs to |
| `enabled` | boolean |  | true when missing |

**201**: Added (`application/json`)

[RemoteTarget](https://docs.neode.sk/development/api-reference/schemas.md#remotetarget).

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

## GET /api/remote-targets/readiness

Show whether passwords can be saved and sessions can start.

On the server API, port 21114. Needs `remote_target.view`.

**200**: The readiness (`application/json`)

| Field | Type | What it is |
|---|---|---|
| `vault` | boolean | Whether passwords can be saved (REMOTE_TARGET_VAULT_KEY is set) |
| `guacd` | boolean | Whether sessions can start (guacd answers at GUACD_ADDRESS) |

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

## POST /api/remote-targets/test

Check that an address answers, before adding it as a target.

Opens a TCP connection to host and port, waiting at most 5 seconds. Loopback, link-local and cloud metadata addresses are refused. Nothing is saved.

On the server API, port 21114. Needs `remote_target.test`.

Request body, `application/json`:

The same fields as for adding a target; only host and port are tried, the rest is checked.

| Field | Type | Required | What it is |
|---|---|---|---|
| `name` | string | yes | at most 160 characters; at most 160 characters |
| `protocol` | string, one of `rdp`, `vnc` | yes |  |
| `host` | string | yes | a host name or IP address, at most 253 characters, without spaces or slashes; at most 253 characters |
| `port` | integer | yes | at least 1, at most 65535 |
| `platform` | string |  |  |
| `username` | string |  |  |
| `credential_mode` | string, one of `saved`, `prompt`, `none` |  | prompt when missing |
| `tls_mode` | string, one of `required`, `preferred`, `disabled` |  | preferred when missing |
| `cert_fingerprint` | string |  | the certificate fingerprint to trust, at most 128 characters; at most 128 characters |
| `org_id` | string |  | the organization the target belongs to |
| `enabled` | boolean |  | true when missing |

**200**: The address answers (`application/json`)

| Field | Type |
|---|---|
| `reachable` | `true` |
| `protocol` | string |
| `host` | string |
| `port` | integer |

| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 502 | The address is not allowed, or it does not answer |

## GET /api/remote-targets/{id}

Show one remote target.

The route does not check the caller's organization or device scope.

On the server API, port 21114. Needs `remote_target.view`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The remote target ID (rt_...) |

**200**: The target (`application/json`)

[RemoteTarget](https://docs.neode.sk/development/api-reference/schemas.md#remotetarget).

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

## PATCH /api/remote-targets/{id}

Change a remote target.

Fields that are missing or empty keep their value, except platform, which a change without it clears. The route does not check the caller's organization or device scope.

On the server API, port 21114. Needs `remote_target.edit`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The remote target ID (rt_...) |

Request body, `application/json`:

Fields that are missing or empty keep their value, except platform.

| Field | Type | What it is |
|---|---|---|
| `name` | string | at most 160 characters; at most 160 characters |
| `protocol` | string, one of `rdp`, `vnc` |  |
| `host` | string | a host name or IP address, at most 253 characters, without spaces or slashes; at most 253 characters |
| `port` | integer | at least 1, at most 65535 |
| `platform` | string | replaces the platform; missing or empty clears it |
| `username` | string |  |
| `credential_mode` | string, one of `saved`, `prompt`, `none` | prompt when missing |
| `tls_mode` | string, one of `required`, `preferred`, `disabled` | preferred when missing |
| `cert_fingerprint` | string | the certificate fingerprint to trust, at most 128 characters; at most 128 characters |
| `org_id` | string | the organization the target belongs to |
| `enabled` | boolean | keeps its value when missing |

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

[RemoteTarget](https://docs.neode.sk/development/api-reference/schemas.md#remotetarget).

| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 404 | No such remote target |

## DELETE /api/remote-targets/{id}

Delete a remote target.

The route does not check the caller's organization or device scope.

On the server API, port 21114. Needs `remote_target.delete`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The remote target ID (rt_...) |

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

| Field | Type |
|---|---|
| `status` | `"deleted"` |
| `id` | string |

| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 404 | No such remote target, or it could not be deleted |

## POST /api/remote-targets/{id}/certificate/accept

Trust a remote target's certificate.

Saves the fingerprint; sessions then check the certificate against it.

On the server API, port 21114. Needs `remote_target.connect`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The remote target ID (rt_...) |

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `fingerprint` | string | yes | hexadecimal; spaces are taken out and letters made small. The first group must have at least 32 characters. |

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

| Field | Type |
|---|---|
| `status` | `"ok"` |
| `fingerprint` | string |

| Error | When |
|---|---|
| 400 | The body or the fingerprint is not valid |
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 404 | No such remote target |

## GET /api/remote-targets/{id}/credentials

Show whether a remote target has a saved password (never the password).

On the server API, port 21114. Needs `remote_target.view`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The remote target ID (rt_...) |

**200**: The sign-in state (`application/json`)

| Field | Type |
|---|---|
| `username` | string |
| `password_set` | boolean |
| `credential_mode` | string, one of `saved`, `prompt`, `none` |

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

## PUT /api/remote-targets/{id}/credentials

Save a remote target's sign-in, encrypted.

credential_mode becomes saved. Takes a body of at most 16 kB.

On the server API, port 21114. Needs `remote_target.edit`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The remote target ID (rt_...) |

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `username` | string |  | at most 256 characters; at most 256 characters |
| `password` | string | yes | at most 4096 characters; at most 4096 characters |

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

| Field | Type |
|---|---|
| `status` | `"ok"` |
| `username` | string |
| `password_set` | `true` |

| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 404 | No such remote target |
| 503 | The credential vault is not configured (REMOTE_TARGET_VAULT_KEY) |

## DELETE /api/remote-targets/{id}/credentials

Delete a remote target's saved password.

credential_mode becomes prompt. The username stays.

On the server API, port 21114. Needs `remote_target.edit`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The remote target ID (rt_...) |

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

| Field | Type |
|---|---|
| `status` | `"ok"` |
| `credential_mode` | `"prompt"` |

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

## GET /api/remote-targets/{id}/tunnel

Open a session to a remote target.

Opens a WebSocket that speaks the Guacamole protocol to guacd. The server fills in host, port and the saved sign-in of the target in the connect instruction; the browser never sees them. The query can only narrow the session. A target with a trusted fingerprint is checked first.

On the server API, port 21114. Needs `remote_target.connect`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `id` | path | string | yes | The remote target ID (rt_...) |
| `read_only` | query | string, one of `1` |  | 1 for a session without input |
| `no_clipboard` | query | string, one of `1` |  | 1 to turn off copy and paste |
| `no_audio` | query | string, one of `1` |  | 1 to turn off sound |

**101**: Switching to the WebSocket

| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 404 | No such remote target, or it is turned off |
| 502 | The address is not allowed, or the certificate does not match |
| 503 | The RDP and VNC gateway (GUACD_ADDRESS) is not configured |
| default | The request was not a WebSocket upgrade the server could take (plain text) |
