curl --request POST \
--url https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"device": {
"id": "<string>",
"kind": "desktop",
"provider": "openwork_desktop",
"source": "desktop_app",
"platform": "darwin",
"label": "<string>",
"access": "mine",
"availability": "online",
"state": "ready",
"statusDetail": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"appVersion": "<string>",
"computerId": "<string>",
"workbotChat": "<string>",
"canRename": true,
"canRemove": true,
"disconnectedAt": "2023-11-07T05:31:56Z",
"canDisconnect": false
},
"signedOut": true
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Disconnect one of my computers
Disconnects the caller’s own signed-in desktop from the organization. Den stops accepting that install as their computer at once: it gets no runner credential, takes no remote tasks, shares no sessions and its reports are refused with 403 computer_disconnected; work that was going through it is failed. Where Den knows the sign-in the desktop uses and it is not the one making this request, that sign-in is ended too (signedOut), so OpenWork there is signed out. The computer stays in the list as disconnected; signing in on it again connects it again. Repeating the call changes nothing. Someone else’s computer answers 404; a computer that never signs in (a virtual computer, Workbot’s) answers 409 not_disconnectable. Needs a signed-in session and the Devices feature.
curl --request POST \
--url https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/remote-devices/{deviceId}/disconnect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"device": {
"id": "<string>",
"kind": "desktop",
"provider": "openwork_desktop",
"source": "desktop_app",
"platform": "darwin",
"label": "<string>",
"access": "mine",
"availability": "online",
"state": "ready",
"statusDetail": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"appVersion": "<string>",
"computerId": "<string>",
"workbotChat": "<string>",
"canRename": true,
"canRemove": true,
"disconnectedAt": "2023-11-07T05:31:56Z",
"canDisconnect": false
},
"signedOut": true
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Organization API key passed as the x-api-key header. The raw key is the header value; do not prefix it with Bearer.
Path Parameters
Den TypeID with 'rdv_' prefix and a 26-character base32 suffix.
30Was this page helpful?