Retirer des destinations d’une passerelle 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 (Entreprise) [Bêta]
Retirer des destinations d’une passerelle Devin Connect
Supprimer des destinations de la liste de la passerelle ; celles qui n’y figurent pas sont ignorées.
DELETE
/
v3beta1
/
enterprise
/
devin-connect
/
gateways
/
{gateway_id}
/
destinations
Retirer des destinations d’une passerelle 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"
}Supprime d’une passerelle Devin Connect les destinations indiquées dans le corps de la requête. Les destinations sont transmises dans le corps plutôt que dans le chemin, car un CIDR IPv4 contient le caractère
/.
Autorisations
Nécessite un utilisateur de service ou un jeton d’accès personnel disposant de l’autorisationManageEnterpriseSettings au niveau Enterprise. Devin Connect doit être activé pour l’Enterprise ; sinon, l’endpoint renvoie 403.
Comportement
- Les destinations utilisent le même format que Ajouter des destinations de passerelle et sont normalisées de la même manière avant la mise en correspondance.
- Les destinations que la passerelle ne route pas sont ignorées : vous pouvez donc répéter une suppression sans risque.
- Pour supprimer toutes les destinations, utilisez Remplacer les destinations de passerelle avec une liste vide.
- Supprimer une destination de la passerelle ne modifie aucun profil de sécurité. Si l’hôte ne doit plus être autorisé, retirez-le séparément du champ
net_policy.allowdu profil. - Les modifications sont enregistrées dans le journal d’audit sous l’action
update_gateway_hostnames.
Corps
application/json
Réponse
Réponse réussie
Une passerelle Devin Connect et les destinations dont le trafic est acheminé via celle-ci.

