Manage computers with the REST API¶
Find, change, and add team computers, and control who can connect to them. Use it to automate what you'd otherwise do 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 can only make
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 need Node.js 18 or later and use top-levelawait: save them as.mjsfiles.
To do the same 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 devices. Add name to filter:
name value |
Matches |
|---|---|
web01 |
Exactly web01 |
web* |
Names starting with web |
*web* |
Names containing web |
Matching ignores case. With no match, 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 these fields. Fields with no value are omitted.
| Field | Contents |
|---|---|
id |
Device ID, used in the paths below. It stays the same unless Connect's settings are reset on the computer. |
name |
Name shown in the dashboard and apps. |
lastOnlineAt |
When 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 who get access through a group aren't 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 isn't on the team returns 404.
Rename a computer¶
This changes the computer's name for everyone on the team. The response returns 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 removes the computer from the team immediately, with no confirmation. See Remove a computer for what that means.
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 that runs it joins the team with no 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 let the installer add only one computer. |
requireAuthentication |
true to create an attributed installer: the person adding the computer must sign in, so it can't be used for unattended installs. |
The 201 response includes:
| Response field | Contents |
|---|---|
id |
Installer ID. Use it 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. Don't 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're done.
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: delete installers you no longer need.
Delete an installer¶
Call DELETE /v1/team/{teamID}/invite/device/{inviteID} with the installer's id as inviteID. Copies of the installer and its Connect Code stop working. Computers it already added stay 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 takes users (user IDs) and groups (Access Group IDs). See Manage users and access with the REST API to look up IDs, and Control access with Access Groups for how access works.
| 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 that has 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. Anyone not in the lists loses direct access, and an omitted or empty list removes everyone of that type. To add without removing, 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 some computers fail. Check errors in the response: it lists each computer that failed and is omitted when none did.
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 you can put in your own tools. They include the computer's current name, so get them again after renaming a computer.
| Field | Opens |
|---|---|
connect |
An unattended connection to the computer in the Jump Desktop app. The person connecting is asked 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 allow it. |
dashboard |
The computer's page in the Teams dashboard. |
connect and askScreenShare only work where the Jump Desktop app is installed. They're jump:// links: see Launch links and connection files.
Tags and annotations¶
Annotations are key-value pairs 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 stay.
In the dashboard, a computer's tags are one annotation with the key tag and a comma-separated value, and most other keys show 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