Manage computers with the REST API#
The REST API computer endpoints find, modify, and add team computers and control which users and Access Groups can connect to them. Use these endpoints to automate tasks otherwise performed in the Teams dashboard, for example to create installers from a provisioning script or remove retired computers.
Applies to#
- A Jump Desktop for Teams team, and an API token from a team Admin. Admin (Read-Only) users and read-only tokens are restricted to
GETrequests. See Get started with the REST API for tokens, team IDs, and error responses. - Samples use placeholder IDs
T-EXAMPLE123(team),D-EXAMPLE456(computer),U-EXAMPLE111(user), andG-EXAMPLE789(Access Group), and read the token fromJUMP_API_TOKEN. - Python samples use the
requestspackage. JavaScript samples require Node.js 18 or later and use top-levelawait, so save them as.mjsfiles.
To perform these tasks in the Teams dashboard, see Add and manage computers.
Find a computer by name#
GET /v1/team/{teamID}/devices returns every computer on the team in the devices array. To filter by name, add the name parameter:
name value |
Matches |
|---|---|
web01 |
Exactly web01 |
web* |
Names starting with web |
*web* |
Names containing web |
Matching is case-insensitive. If no computer matches, devices is an empty array.
import os
import requests
resp = requests.get(
"https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/devices",
headers={"Authorization": f"Bearer {os.environ['JUMP_API_TOKEN']}"},
params={"name": "*web*"},
)
if not resp.ok:
raise SystemExit(f"{resp.status_code} {resp.text}")
for device in resp.json()["devices"]:
print(device["id"], device["name"])
const url = new URL("https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/devices");
url.searchParams.set("name", "*web*");
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.JUMP_API_TOKEN}` },
});
if (!res.ok) {
console.error(res.status, await res.text());
process.exit(1);
}
const { devices } = await res.json();
for (const device of devices) console.log(device.id, device.name);
Invoke-RestMethod throws on a non-2xx response.
$headers = @{ Authorization = "Bearer $env:JUMP_API_TOKEN" }
$uri = "https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/devices?name=*web*"
try {
(Invoke-RestMethod -Uri $uri -Headers $headers).devices | Select-Object id, name
} catch {
Write-Error "$($_.Exception.Response.StatusCode.value__) $($_.ErrorDetails.Message)"
exit 1
}
Each computer includes the following fields. Fields without a value are omitted.
| Field | Contents |
|---|---|
id |
Device ID, used in the request paths on this page. The ID persists unless Connect's settings are reset on the computer. |
name |
Name shown in the dashboard and apps. |
lastOnlineAt |
Time the computer last connected to Jump Desktop, in seconds since the Unix epoch. |
users, groups |
IDs of users and Access Groups with direct access. Users with access through a group are not listed in users. |
annotations |
Tags and other annotations. |
clientInfo |
Connect version and operating system details. |
Get, rename, or remove a computer#
| Task | Request |
|---|---|
| Get one computer | GET /v1/team/{teamID}/device/{deviceID}. Same fields as above. |
| Rename | PATCH /v1/team/{teamID}/device/{deviceID} with {"name": "..."}. name is the only field you can change, up to 64 characters. |
| Remove from the team | DELETE /v1/team/{teamID}/device/{deviceID} |
Getting or renaming a computer that is not on the team returns 404.
Rename a computer#
Renaming changes the computer's name for everyone on the team. The response contains id and the new name.
const res = await fetch(
"https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/D-EXAMPLE456",
{
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.JUMP_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Reception PC" }),
},
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
Remove a computer#
Warning
This request removes the computer from the team immediately, with no confirmation. For the consequences of removal, see Remove a computer.
curl --fail-with-body -sS -X DELETE \
https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/D-EXAMPLE456 \
-H "Authorization: Bearer $JUMP_API_TOKEN"
Add computers with a pre-configured installer#
POST /v1/team/{teamID}/invite/device creates a pre-configured Jump Desktop Connect installer. A computer running the installer joins the team without a sign-in.
| Request field | Meaning |
|---|---|
name |
Installer name shown in Add Computers. Up to 64 characters. |
users |
IDs of users who get access to each computer added with this installer. |
groups |
IDs of Access Groups each computer is added to. |
expirySecs |
Seconds until the installer expires. Omit it, or send 0, for no expiry. |
singleUse |
true to restrict the installer to adding one computer. |
requireAuthentication |
true to create an attributed installer: the person adding the computer must sign in, so the installer cannot be used for unattended installations. |
The 201 response includes:
| Response field | Contents |
|---|---|
id |
Installer ID, required to delete the installer. |
secret |
The installer's Connect Code. |
connectDownloads |
Download URLs: winexe (Windows EXE), winmsi (Windows MSI), and macpkg (macOS PKG). |
Download a file from connectDownloads and run it on the computer. Do not rename the downloaded file before running it. To install on many computers, see Deploy Connect to many computers. To look up user and group IDs, see Manage users and access with the REST API.
Warning
The download URLs and Connect Code are public; anyone who has one can add a computer to your team. Delete the installer when you no longer need it.
import os
import requests
resp = requests.post(
"https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/invite/device",
headers={"Authorization": f"Bearer {os.environ['JUMP_API_TOKEN']}"},
json={"name": "Front office", "groups": ["G-EXAMPLE789"], "expirySecs": 86400},
)
resp.raise_for_status()
installer = resp.json()
print(installer["id"], installer["connectDownloads"]["winmsi"])
const res = await fetch("https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/invite/device", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.JUMP_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Front office", groups: ["G-EXAMPLE789"], expirySecs: 86400 }),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const installer = await res.json();
console.log(installer.id, installer.connectDownloads.winmsi);
$headers = @{ Authorization = "Bearer $env:JUMP_API_TOKEN" }
$body = @{ name = "Front office"; groups = @("G-EXAMPLE789"); expirySecs = 86400 } | ConvertTo-Json
$installer = Invoke-RestMethod -Method Post -Uri "https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/invite/device" `
-Headers $headers -ContentType "application/json" -Body $body
$installer.connectDownloads.winmsi
If the team has reached its installer limit, the request fails with 400 and code invite-limit-reached. To create more installers, delete installers you no longer need.
Delete an installer#
Call DELETE /v1/team/{teamID}/invite/device/{inviteID} with the installer's id as inviteID. After deletion, copies of the installer and its Connect Code stop working; computers the installer already added remain on the team. An unknown ID returns 404 with code invite-not-found.
curl --fail-with-body -sS -X DELETE \
https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/invite/device/AC-EXAMPLE321 \
-H "Authorization: Bearer $JUMP_API_TOKEN"
Set who can connect to a computer#
Each request accepts users (user IDs) and groups (Access Group IDs). To look up IDs, see Manage users and access with the REST API. For how access works, see Control access with Access Groups.
| Goal | Request | Body |
|---|---|---|
| Replace everyone with access | PUT /v1/team/{teamID}/device/{deviceID}/members |
users, groups |
| Add users or groups | POST /v1/team/{teamID}/device/{deviceID}/members |
users, groups |
| Remove users or groups | POST /v1/team/{teamID}/device/{deviceID}/members/delete |
users, groups |
| Add to several computers | PATCH /v1/team/{teamID}/device/members |
devices, users, groups |
| Remove from several computers | PATCH /v1/team/{teamID}/device/members/delete |
devices, users, groups |
Adding a group with a Connect Configuration clears any configuration assigned directly to the computer. See Configure computers with Connect Configurations.
Replace access#
Warning
PUT replaces the computer's users and groups with exactly the lists you send. Any user or group not in the lists loses direct access, and an omitted or empty list removes every user or group of that type. To add access without removing existing access, use POST instead.
const res = await fetch(
"https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/D-EXAMPLE456/members",
{
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.JUMP_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ users: ["U-EXAMPLE111"], groups: ["G-EXAMPLE789"] }),
},
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
$headers = @{ Authorization = "Bearer $env:JUMP_API_TOKEN" }
$body = @{ users = @("U-EXAMPLE111"); groups = @("G-EXAMPLE789") } | ConvertTo-Json
Invoke-RestMethod -Method Put -Uri "https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/D-EXAMPLE456/members" `
-Headers $headers -ContentType "application/json" -Body $body
Add access to several computers#
The bulk requests return 200 even when the change fails for some computers. Check the errors field in the response, which lists each failed computer and is omitted when no computer failed.
import os
import requests
resp = requests.patch(
"https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/members",
headers={"Authorization": f"Bearer {os.environ['JUMP_API_TOKEN']}"},
json={"devices": ["D-EXAMPLE456", "D-EXAMPLE457"], "users": ["U-EXAMPLE111"]},
)
resp.raise_for_status()
for error in resp.json().get("errors", []):
print("Failed:", error)
const res = await fetch("https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/members", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.JUMP_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ devices: ["D-EXAMPLE456", "D-EXAMPLE457"], users: ["U-EXAMPLE111"] }),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { errors = [] } = await res.json();
for (const error of errors) console.error("Failed:", error);
$headers = @{ Authorization = "Bearer $env:JUMP_API_TOKEN" }
$body = @{ devices = @("D-EXAMPLE456", "D-EXAMPLE457"); users = @("U-EXAMPLE111") } | ConvertTo-Json
$result = Invoke-RestMethod -Method Patch -Uri "https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/members" `
-Headers $headers -ContentType "application/json" -Body $body
$result.errors
Get launch URLs for a computer#
GET /v1/team/{teamID}/device/{deviceID}/urls returns links for use in your own tools. The links include the computer's current name, so request them again after renaming the computer.
| Field | Opens |
|---|---|
connect |
An unattended connection to the computer in the Jump Desktop app. The person connecting is prompted for the computer's credentials. |
askScreenShare |
A screen share request in the Jump Desktop app. The person signed in at the computer is asked to approve the request. |
dashboard |
The computer's page in the Teams dashboard. |
connect and askScreenShare work only on devices with the Jump Desktop app installed. Both are jump:// links; see Launch links and connection files.
Tags and annotations#
Annotations are key-value pairs stored on a computer. Keys are 1 to 64 characters; values are up to 2,048 characters.
| Task | Request | Body |
|---|---|---|
| Get | GET /v1/team/{teamID}/device/{deviceID}/annotations |
None |
| Add or update | POST /v1/team/{teamID}/device/{deviceID}/annotations |
annotations: array of {"key", "value"} |
| Remove | POST /v1/team/{teamID}/device/{deviceID}/annotations/delete |
annotationKeys: array of keys |
Adding or updating changes only the keys you send; other annotations remain unchanged.
In the Teams dashboard, a computer's tags are stored as one annotation with the key tag and a comma-separated value, and most other keys appear as custom fields. Writing tag replaces all of the computer's tags.
curl --fail-with-body -sS -X POST \
https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/D-EXAMPLE456/annotations \
-H "Authorization: Bearer $JUMP_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"annotations": [{"key": "tag", "value": "Finance,London"}, {"key": "Asset number", "value": "A-1042"}]}'
import os
import requests
resp = requests.post(
"https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/D-EXAMPLE456/annotations",
headers={"Authorization": f"Bearer {os.environ['JUMP_API_TOKEN']}"},
json={
"annotations": [
{"key": "tag", "value": "Finance,London"},
{"key": "Asset number", "value": "A-1042"},
]
},
)
resp.raise_for_status()
const res = await fetch(
"https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/D-EXAMPLE456/annotations",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.JUMP_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
annotations: [
{ key: "tag", value: "Finance,London" },
{ key: "Asset number", value: "A-1042" },
],
}),
},
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
$headers = @{ Authorization = "Bearer $env:JUMP_API_TOKEN" }
$body = @{
annotations = @(
@{ key = "tag"; value = "Finance,London" },
@{ key = "Asset number"; value = "A-1042" }
)
} | ConvertTo-Json -Depth 3
Invoke-RestMethod -Method Post -Uri "https://api.jumpdesktop.com/v1/team/T-EXAMPLE123/device/D-EXAMPLE456/annotations" `
-Headers $headers -ContentType "application/json" -Body $body