curl --request POST \
--url https://api.openworklabs.com/v1/org/computers/{deviceId}/disconnect \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/org/computers/{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/org/computers/{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/org/computers/{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/org/computers/{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/org/computers/{deviceId}/disconnect")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/org/computers/{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>",
"availability": "online",
"state": "ready",
"statusDetail": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"appVersion": "<string>",
"computerId": "<string>",
"workbotChat": "<string>",
"organization": {
"id": "<string>",
"name": "<string>"
},
"owner": {
"memberId": "<string>",
"name": "<string>",
"email": "<string>",
"former": false
},
"shared": true,
"externalId": "<string>",
"removedAt": "2023-11-07T05:31:56Z",
"recentProblems": 4503599627370495,
"lastEvent": {
"id": "<string>",
"type": "registered",
"level": "info",
"message": "<string>",
"actor": "member",
"createdAt": "2023-11-07T05:31:56Z",
"data": {},
"actorId": "<string>"
},
"canRemove": false,
"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 a member's computer
Disconnects a current member’s signed-in desktop from the organization. Den stops accepting that install as the member’s 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 team list as disconnected; signing in on it again connects it again. Repeating the call changes nothing. A computer that never signs in, or whose owner is no longer a member (it is already refused; remove it instead), answers 409 not_disconnectable. Requires Devices and computers.disconnect with a recent sign-in. Grants no access to the computer.
curl --request POST \
--url https://api.openworklabs.com/v1/org/computers/{deviceId}/disconnect \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/org/computers/{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/org/computers/{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/org/computers/{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/org/computers/{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/org/computers/{deviceId}/disconnect")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/org/computers/{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>",
"availability": "online",
"state": "ready",
"statusDetail": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"appVersion": "<string>",
"computerId": "<string>",
"workbotChat": "<string>",
"organization": {
"id": "<string>",
"name": "<string>"
},
"owner": {
"memberId": "<string>",
"name": "<string>",
"email": "<string>",
"former": false
},
"shared": true,
"externalId": "<string>",
"removedAt": "2023-11-07T05:31:56Z",
"recentProblems": 4503599627370495,
"lastEvent": {
"id": "<string>",
"type": "registered",
"level": "info",
"message": "<string>",
"actor": "member",
"createdAt": "2023-11-07T05:31:56Z",
"data": {},
"actorId": "<string>"
},
"canRemove": false,
"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?