Remove an agent from discovery
curl --request DELETE \
--url https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}', 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://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <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://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"removed": true
}{
"code": 400,
"message": "Invalid request"
}{
"code": 400,
"message": "Invalid request"
}{
"code": 400,
"message": "Invalid request"
}{
"code": 400,
"message": "Invalid request"
}{
"code": 400,
"message": "Invalid request"
}aispm-agents
Remove an agent from discovery
Removes an agent from this workspace’s inventory and frees its managed slot. The agent reappears if it is reported again, and must then be re-managed to count as managed. Idempotent. Requires manage.managed_agents (OrgAdmin).
DELETE
/
aispm-agents
/
tenants
/
{tenant_id}
/
workspaces
/
{workspace_id}
/
{id}
Remove an agent from discovery
curl --request DELETE \
--url https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}', 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://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <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://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"removed": true
}{
"code": 400,
"message": "Invalid request"
}{
"code": 400,
"message": "Invalid request"
}{
"code": 400,
"message": "Invalid request"
}{
"code": 400,
"message": "Invalid request"
}{
"code": 400,
"message": "Invalid request"
}Was this page helpful?

