Devin Connect gatewayから宛先を削除
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)[ベータ版]
Devin Connect gatewayから宛先を削除
gateway のリストから宛先を削除します。リストにない宛先は無視されます。
DELETE
/
v3beta1
/
enterprise
/
devin-connect
/
gateways
/
{gateway_id}
/
destinations
Devin Connect gatewayから宛先を削除
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 の gateway から、リクエストボディで指定した宛先を削除します。IPv4 CIDR には
/ が含まれるため、宛先はパスではなくボディで指定します。
権限
エンタープライズレベルでManageEnterpriseSettings 権限を持つサービスユーザーまたは個人用アクセストークンが必要です。また、エンタープライズで Devin Connect が有効になっている必要があります。有効になっていない場合、このエンドポイントは 403 を返します。
動作
- 宛先は gateway の宛先を追加 と同じ形式で指定し、マッチングの前に同じ方法で正規化されます。
- gateway がルーティングしていない宛先は無視されるため、同じ削除を繰り返しても問題ありません。
- すべての宛先を削除するには、空のリストを指定して gateway の宛先を置き換え を利用してください。
- gateway から宛先を削除しても、セキュリティプロファイル は変更されません。そのホストへのアクセスを今後許可しない場合は、プロファイルの
net_policy.allowからホストを別途削除してください。 - 変更内容は 監査ログ に
update_gateway_hostnamesとして記録されます。
ボディ
application/json
レスポンス
成功レスポンス
Devin Connect gatewayと、それを経由してルーティングされる宛先。

