Rimuovi destinazioni da un gateway Devin Connect
curl --request DELETE \
--url https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinations": [
{
"hostname": "<string>",
"ipv4": "<string>"
}
]
}
'import requests
url = "https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations"
payload = { "destinations": [
{
"hostname": "<string>",
"ipv4": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({destinations: [{hostname: '<string>', ipv4: '<string>'}]})
};
fetch('https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations', 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.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'destinations' => [
[
'hostname' => '<string>',
'ipv4' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations"
payload := strings.NewReader("{\n \"destinations\": [\n {\n \"hostname\": \"<string>\",\n \"ipv4\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": [\n {\n \"hostname\": \"<string>\",\n \"ipv4\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destinations\": [\n {\n \"hostname\": \"<string>\",\n \"ipv4\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"destinations": [
{
"hostname": "<string>",
"ipv4": "<string>"
}
],
"gateway_id": "<string>",
"kind": "tunnel",
"name": "<string>",
"connected": true,
"last_connected_at": 123
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Devin Connect (Enterprise) [Beta]
Rimuovi destinazioni da un gateway Devin Connect
Rimuovi le destinazioni dall’elenco del gateway; quelle non presenti vengono ignorate.
DELETE
/
v3beta1
/
enterprise
/
devin-connect
/
gateways
/
{gateway_id}
/
destinations
Rimuovi destinazioni da un gateway Devin Connect
curl --request DELETE \
--url https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinations": [
{
"hostname": "<string>",
"ipv4": "<string>"
}
]
}
'import requests
url = "https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations"
payload = { "destinations": [
{
"hostname": "<string>",
"ipv4": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({destinations: [{hostname: '<string>', ipv4: '<string>'}]})
};
fetch('https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations', 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.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'destinations' => [
[
'hostname' => '<string>',
'ipv4' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations"
payload := strings.NewReader("{\n \"destinations\": [\n {\n \"hostname\": \"<string>\",\n \"ipv4\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": [\n {\n \"hostname\": \"<string>\",\n \"ipv4\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destinations\": [\n {\n \"hostname\": \"<string>\",\n \"ipv4\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"destinations": [
{
"hostname": "<string>",
"ipv4": "<string>"
}
],
"gateway_id": "<string>",
"kind": "tunnel",
"name": "<string>",
"connected": true,
"last_connected_at": 123
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Rimuove da un gateway Devin Connect le destinazioni specificate nel corpo della richiesta. Le destinazioni vengono inviate nel corpo anziché nel percorso perché un CIDR IPv4 contiene il carattere
/.
Autorizzazioni
Richiede un utente di servizio o un token di accesso personale con l’autorizzazioneManageEnterpriseSettings a livello aziendale. Devin Connect deve essere abilitato per l’azienda; in caso contrario, l’endpoint restituisce 403.
Comportamento
- Le destinazioni usano lo stesso formato di Aggiungere destinazioni del gateway e vengono normalizzate allo stesso modo prima della verifica di corrispondenza.
- Le destinazioni non instradate dal gateway vengono ignorate, quindi è possibile ripetere una rimozione senza rischi.
- Per rimuovere tutte le destinazioni, usa Sostituire le destinazioni del gateway con un elenco vuoto.
- La rimozione di una destinazione dal gateway non modifica alcun profilo di sicurezza. Se l’host non deve più essere consentito, rimuovilo separatamente da
net_policy.allowdel profilo. - Le modifiche vengono registrate nel registro di audit come
update_gateway_hostnames.
Autorizzazioni
Corpo
application/json
Risposta
Risposta riuscita
Un gateway Devin Connect e le destinazioni instradate attraverso di esso.

