Delete a device

Deletes a specific device from the organization.

delete
/servers/{id}

https://console.automox.com/api/servers/{id}
Request
Response
Request
Path Parameters
id
required
integer
Server ID for the specified device
Headers
Authorization: Bearer
required
string
Your Automox API Key for authentication Format: Authorization: Bearer your_automox_api_key
Query Parameters
o
required
integer
Organization ID for the specified device
Response
204: No Content
{
"description": "Successful response"
}

NOTE:

The associated command queue will be purged. Any pending custom commands for a device are removed.

Example Requests

cURL
Python http.client
Python requests
C#
PowerShell
cURL
curl -X DELETE \
'https://console.automox.com/api/servers/123456?o=0000' \
-H 'Authorization: Bearer your_automox_api_key'
Python http.client
import http.client
conn = http.client.HTTPConnection("console,automox,com")
headers = {
'Authorization': "Bearer your_automox_api_key"
}
conn.request("DELETE", "api,servers,123456", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Python requests
import requests
url = "https://console.automox.com/api/servers/123456"
querystring = {"o":"0000"}
headers = {
'Authorization': "Bearer your_automox_api_key"
}
response = requests.request("DELETE", url, headers=headers, params=querystring)
print(response.text)
C#
var client = new RestClient("https://console.automox.com/api/servers/123456?o=0000");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer your_automox_api_key");
IRestResponse response = client.Execute(request);
PowerShell
$apiKey = 'your_automox_api_key'
$headers = @{ "Authorization" = "Bearer $apiKey" }
$url = "https://console.automox.com/api/servers/123456?o=0000"
Invoke-WebRequest -Method Delete -Uri $url -Headers $headers