Skip to main content

Connections

GET /connections

List all connections and groups accessible to the current user — including connections shared with them.

  • Auth required: Yes

Response

{
"groups": [
{ "id": "grp_abc", "name": "Production", "parentId": null, "sortOrder": 0 }
],
"ungrouped": [
{ "id": "conn_abc", "name": "Web Server", "protocol": "ssh", "host": "10.0.0.1", "port": 22, "tags": ["prod"] }
],
"sharedConnections": []
}

POST /connections

Create a new connection.

  • Auth required: Yes
  • Permission: connections.create

Request body

{
"name": "Web Server",
"protocol": "ssh",
"host": "10.0.0.1",
"port": 22,
"username": "root",
"password": "secret",
"groupId": "grp_abc",
"tags": ["prod", "linux"],
"shared": false,
"skipCertValidation": false
}

Supported protocols: ssh, rdp, vnc, telnet, sftp, smb, ftp

Additional fields for SSH:

{
"privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----...",
"tunnels": [{ "localPort": 5432, "remoteHost": "localhost", "remotePort": 5432 }]
}

Additional fields for RDP:

{
"extraConfig": { "domain": "CORP", "resolution": "1920x1080" }
}

Response

{
"id": "conn_xyz",
"name": "Web Server",
"protocol": "ssh",
"host": "10.0.0.1",
"port": 22,
"username": "root",
"groupId": "grp_abc",
"shared": false
}

GET /connections/:id

Get full details for a connection.

  • Auth required: Yes

Response

{
"id": "conn_xyz",
"name": "Web Server",
"protocol": "ssh",
"host": "10.0.0.1",
"port": 22,
"username": "root",
"groupId": "grp_abc",
"recordingEnabled": true,
"hasPassword": true,
"hasPrivateKey": false,
"shared": false,
"tunnels": [],
"extraConfig": {},
"tags": ["prod"],
"shares": [],
"skipCertValidation": false
}

PUT /connections/:id

Update a connection.

  • Auth required: Yes
  • Permission: connections.edit_own (own) or connections.edit_any (any)

Request body (all fields optional)

{
"name": "Web Server 2",
"host": "10.0.0.2",
"port": 2222,
"username": "deploy",
"password": "new-secret",
"tags": ["prod", "updated"]
}

Response

{ "success": true }

DELETE /connections/:id

Delete a connection.

  • Auth required: Yes
  • Permission: connections.delete_own (own) or connections.delete_any (any)

Response

{ "success": true }

GET /connections/:id/session

Get decrypted connection credentials. Used internally by the terminal/session engine.

  • Auth required: Yes

Response

{
"host": "10.0.0.1",
"port": 22,
"username": "root",
"password": "secret"
}

GET /connections/:id/shares

List users and roles this connection is shared with.

  • Auth required: Yes (owner or connections.edit_any)

Response

{
"shares": [
{ "id": "share_abc", "shareType": "role", "targetId": "role_xyz", "createdAt": "..." }
]
}

PUT /connections/:id/shares

Replace all sharing rules for a connection.

  • Auth required: Yes (owner + connections.share)

Request body

{
"shares": [
{ "shareType": "user", "targetId": "user_abc" },
{ "shareType": "role", "targetId": "role_xyz" }
]
}

Response

{ "success": true }

POST /connections/health-check

Perform a TCP reachability check for one or more connections.

  • Auth required: Yes

Request body

{
"checks": [
{ "id": "conn_abc", "host": "10.0.0.1", "port": 22 }
]
}

Response

{
"results": [
{ "id": "conn_abc", "reachable": true, "latencyMs": 4 }
]
}

GET /connections/export

Export all connections and groups as a JSON file (passwords excluded).

  • Auth required: Yes
  • Permission: connections.import_export

Response: JSON file attachment.


POST /connections/import

Import connections and groups from a previously exported JSON file.

  • Auth required: Yes
  • Permission: connections.import_export

Request body

{
"version": 1,
"groups": [{ "id": "grp_abc", "name": "Production", "parentId": null }],
"connections": [{ "name": "Web Server", "protocol": "ssh", "host": "10.0.0.1", "port": 22 }]
}

Response

{
"groupsCreated": 1,
"connectionsCreated": 1,
"newGroupIds": { "grp_abc": "grp_new" }
}

PUT /connections/reorder

Reorder connections within a folder.

  • Auth required: Yes

Request body

{
"items": [
{ "id": "conn_abc", "sortOrder": 0 },
{ "id": "conn_xyz", "sortOrder": 1 }
]
}

Response

{ "success": true }

POST /connections/groups

Create a connection folder.

  • Auth required: Yes

Request body

{
"name": "Production",
"parentId": null
}

Response

{ "id": "grp_abc", "name": "Production", "parentId": null }

PUT /connections/groups/:id

Rename or move a folder.

  • Auth required: Yes

Request body (all fields optional)

{
"name": "Prod Servers",
"parentId": "grp_parent"
}

Response

{ "success": true }

DELETE /connections/groups/:id

Delete a folder and all its connections.

  • Auth required: Yes

Response

{ "success": true }

PUT /connections/groups/reorder

Reorder folders.

  • Auth required: Yes

Request body

{
"items": [
{ "id": "grp_abc", "sortOrder": 0 },
{ "id": "grp_xyz", "sortOrder": 1 }
]
}

Response

{ "success": true }