curl --request PUT \
--url https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"defaultDenyReason": "<string>",
"rules": [
{
"credentialId": "<string>",
"denyReason": "<string>",
"description": "<string>",
"destinations": [
"<string>"
],
"displayName": "<string>",
"id": "<string>",
"ingressScopes": [
"<string>"
],
"methods": [
"<string>"
],
"paths": [
"<string>"
],
"postureId": "<string>",
"principals": [
"<string>"
],
"priority": 123,
"sourceTemplateId": "<string>",
"systemManaged": true
}
],
"tbInstanceId": "<string>"
}
'import requests
url = "https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy"
payload = {
"defaultDenyReason": "<string>",
"rules": [
{
"credentialId": "<string>",
"denyReason": "<string>",
"description": "<string>",
"destinations": ["<string>"],
"displayName": "<string>",
"id": "<string>",
"ingressScopes": ["<string>"],
"methods": ["<string>"],
"paths": ["<string>"],
"postureId": "<string>",
"principals": ["<string>"],
"priority": 123,
"sourceTemplateId": "<string>",
"systemManaged": True
}
],
"tbInstanceId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
defaultDenyReason: '<string>',
rules: [
{
credentialId: '<string>',
denyReason: '<string>',
description: '<string>',
destinations: ['<string>'],
displayName: '<string>',
id: '<string>',
ingressScopes: ['<string>'],
methods: ['<string>'],
paths: ['<string>'],
postureId: '<string>',
principals: ['<string>'],
priority: 123,
sourceTemplateId: '<string>',
systemManaged: true
}
],
tbInstanceId: '<string>'
})
};
fetch('https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy', 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://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'defaultDenyReason' => '<string>',
'rules' => [
[
'credentialId' => '<string>',
'denyReason' => '<string>',
'description' => '<string>',
'destinations' => [
'<string>'
],
'displayName' => '<string>',
'id' => '<string>',
'ingressScopes' => [
'<string>'
],
'methods' => [
'<string>'
],
'paths' => [
'<string>'
],
'postureId' => '<string>',
'principals' => [
'<string>'
],
'priority' => 123,
'sourceTemplateId' => '<string>',
'systemManaged' => true
]
],
'tbInstanceId' => '<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://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy"
payload := strings.NewReader("{\n \"defaultDenyReason\": \"<string>\",\n \"rules\": [\n {\n \"credentialId\": \"<string>\",\n \"denyReason\": \"<string>\",\n \"description\": \"<string>\",\n \"destinations\": [\n \"<string>\"\n ],\n \"displayName\": \"<string>\",\n \"id\": \"<string>\",\n \"ingressScopes\": [\n \"<string>\"\n ],\n \"methods\": [\n \"<string>\"\n ],\n \"paths\": [\n \"<string>\"\n ],\n \"postureId\": \"<string>\",\n \"principals\": [\n \"<string>\"\n ],\n \"priority\": 123,\n \"sourceTemplateId\": \"<string>\",\n \"systemManaged\": true\n }\n ],\n \"tbInstanceId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"defaultDenyReason\": \"<string>\",\n \"rules\": [\n {\n \"credentialId\": \"<string>\",\n \"denyReason\": \"<string>\",\n \"description\": \"<string>\",\n \"destinations\": [\n \"<string>\"\n ],\n \"displayName\": \"<string>\",\n \"id\": \"<string>\",\n \"ingressScopes\": [\n \"<string>\"\n ],\n \"methods\": [\n \"<string>\"\n ],\n \"paths\": [\n \"<string>\"\n ],\n \"postureId\": \"<string>\",\n \"principals\": [\n \"<string>\"\n ],\n \"priority\": 123,\n \"sourceTemplateId\": \"<string>\",\n \"systemManaged\": true\n }\n ],\n \"tbInstanceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"defaultDenyReason\": \"<string>\",\n \"rules\": [\n {\n \"credentialId\": \"<string>\",\n \"denyReason\": \"<string>\",\n \"description\": \"<string>\",\n \"destinations\": [\n \"<string>\"\n ],\n \"displayName\": \"<string>\",\n \"id\": \"<string>\",\n \"ingressScopes\": [\n \"<string>\"\n ],\n \"methods\": [\n \"<string>\"\n ],\n \"paths\": [\n \"<string>\"\n ],\n \"postureId\": \"<string>\",\n \"principals\": [\n \"<string>\"\n ],\n \"priority\": 123,\n \"sourceTemplateId\": \"<string>\",\n \"systemManaged\": true\n }\n ],\n \"tbInstanceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"policy": {
"createdAt": "2023-11-07T05:31:56Z",
"defaultDenyReason": "<string>",
"defaultOutcome": "TB_EGRESS_OUTCOME_UNSPECIFIED",
"generation": "<string>",
"rules": [
{
"credentialId": "<string>",
"denyReason": "<string>",
"description": "<string>",
"destinations": [
"<string>"
],
"displayName": "<string>",
"id": "<string>",
"ingressScopes": [
"<string>"
],
"methods": [
"<string>"
],
"mode": "TB_EGRESS_MODE_UNSPECIFIED",
"outcome": "TB_EGRESS_OUTCOME_UNSPECIFIED",
"paths": [
"<string>"
],
"postureId": "<string>",
"principals": [
"<string>"
],
"priority": 123,
"sourceTemplateId": "<string>",
"systemManaged": true
}
],
"tbInstanceId": "<string>",
"tenantId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Save Egress Policy
SaveEgressPolicy validates every rule against the instance’s latest discovery snapshot (principal/scope/destination/posture/credential must all be names discovery actually reported), bumps generation, and stores the result. Used by both the authoring UI (stage 3) and any direct API caller.
curl --request PUT \
--url https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"defaultDenyReason": "<string>",
"rules": [
{
"credentialId": "<string>",
"denyReason": "<string>",
"description": "<string>",
"destinations": [
"<string>"
],
"displayName": "<string>",
"id": "<string>",
"ingressScopes": [
"<string>"
],
"methods": [
"<string>"
],
"paths": [
"<string>"
],
"postureId": "<string>",
"principals": [
"<string>"
],
"priority": 123,
"sourceTemplateId": "<string>",
"systemManaged": true
}
],
"tbInstanceId": "<string>"
}
'import requests
url = "https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy"
payload = {
"defaultDenyReason": "<string>",
"rules": [
{
"credentialId": "<string>",
"denyReason": "<string>",
"description": "<string>",
"destinations": ["<string>"],
"displayName": "<string>",
"id": "<string>",
"ingressScopes": ["<string>"],
"methods": ["<string>"],
"paths": ["<string>"],
"postureId": "<string>",
"principals": ["<string>"],
"priority": 123,
"sourceTemplateId": "<string>",
"systemManaged": True
}
],
"tbInstanceId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
defaultDenyReason: '<string>',
rules: [
{
credentialId: '<string>',
denyReason: '<string>',
description: '<string>',
destinations: ['<string>'],
displayName: '<string>',
id: '<string>',
ingressScopes: ['<string>'],
methods: ['<string>'],
paths: ['<string>'],
postureId: '<string>',
principals: ['<string>'],
priority: 123,
sourceTemplateId: '<string>',
systemManaged: true
}
],
tbInstanceId: '<string>'
})
};
fetch('https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy', 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://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'defaultDenyReason' => '<string>',
'rules' => [
[
'credentialId' => '<string>',
'denyReason' => '<string>',
'description' => '<string>',
'destinations' => [
'<string>'
],
'displayName' => '<string>',
'id' => '<string>',
'ingressScopes' => [
'<string>'
],
'methods' => [
'<string>'
],
'paths' => [
'<string>'
],
'postureId' => '<string>',
'principals' => [
'<string>'
],
'priority' => 123,
'sourceTemplateId' => '<string>',
'systemManaged' => true
]
],
'tbInstanceId' => '<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://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy"
payload := strings.NewReader("{\n \"defaultDenyReason\": \"<string>\",\n \"rules\": [\n {\n \"credentialId\": \"<string>\",\n \"denyReason\": \"<string>\",\n \"description\": \"<string>\",\n \"destinations\": [\n \"<string>\"\n ],\n \"displayName\": \"<string>\",\n \"id\": \"<string>\",\n \"ingressScopes\": [\n \"<string>\"\n ],\n \"methods\": [\n \"<string>\"\n ],\n \"paths\": [\n \"<string>\"\n ],\n \"postureId\": \"<string>\",\n \"principals\": [\n \"<string>\"\n ],\n \"priority\": 123,\n \"sourceTemplateId\": \"<string>\",\n \"systemManaged\": true\n }\n ],\n \"tbInstanceId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"defaultDenyReason\": \"<string>\",\n \"rules\": [\n {\n \"credentialId\": \"<string>\",\n \"denyReason\": \"<string>\",\n \"description\": \"<string>\",\n \"destinations\": [\n \"<string>\"\n ],\n \"displayName\": \"<string>\",\n \"id\": \"<string>\",\n \"ingressScopes\": [\n \"<string>\"\n ],\n \"methods\": [\n \"<string>\"\n ],\n \"paths\": [\n \"<string>\"\n ],\n \"postureId\": \"<string>\",\n \"principals\": [\n \"<string>\"\n ],\n \"priority\": 123,\n \"sourceTemplateId\": \"<string>\",\n \"systemManaged\": true\n }\n ],\n \"tbInstanceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}.conductor.one/api/v1/tb-control-plane/egress-policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"defaultDenyReason\": \"<string>\",\n \"rules\": [\n {\n \"credentialId\": \"<string>\",\n \"denyReason\": \"<string>\",\n \"description\": \"<string>\",\n \"destinations\": [\n \"<string>\"\n ],\n \"displayName\": \"<string>\",\n \"id\": \"<string>\",\n \"ingressScopes\": [\n \"<string>\"\n ],\n \"methods\": [\n \"<string>\"\n ],\n \"paths\": [\n \"<string>\"\n ],\n \"postureId\": \"<string>\",\n \"principals\": [\n \"<string>\"\n ],\n \"priority\": 123,\n \"sourceTemplateId\": \"<string>\",\n \"systemManaged\": true\n }\n ],\n \"tbInstanceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"policy": {
"createdAt": "2023-11-07T05:31:56Z",
"defaultDenyReason": "<string>",
"defaultOutcome": "TB_EGRESS_OUTCOME_UNSPECIFIED",
"generation": "<string>",
"rules": [
{
"credentialId": "<string>",
"denyReason": "<string>",
"description": "<string>",
"destinations": [
"<string>"
],
"displayName": "<string>",
"id": "<string>",
"ingressScopes": [
"<string>"
],
"methods": [
"<string>"
],
"mode": "TB_EGRESS_MODE_UNSPECIFIED",
"outcome": "TB_EGRESS_OUTCOME_UNSPECIFIED",
"paths": [
"<string>"
],
"postureId": "<string>",
"principals": [
"<string>"
],
"priority": 123,
"sourceTemplateId": "<string>",
"systemManaged": true
}
],
"tbInstanceId": "<string>",
"tenantId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.
Body
The TBControlPlaneServiceSaveEgressPolicyRequest message.
The defaultDenyReason field.
The defaultOutcome field.
TB_EGRESS_OUTCOME_UNSPECIFIED, TB_EGRESS_OUTCOME_ALLOWED, TB_EGRESS_OUTCOME_DENIED The rules field.
Show child attributes
Show child attributes
The tbInstanceId field.
Response
Successful response
The TBControlPlaneServiceSaveEgressPolicyResponse message.
TBEgressPolicy is the typed policy document for one TB instance. Binds per-instance, not per-tenant-across-instances, keyed by tb_instance_id exactly as discovery reports it.
Show child attributes
Show child attributes
Was this page helpful?