curl --request POST \
--url https://us.infisical.com/api/v1/agent-vault/proxies \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"projectId": "<string>",
"description": "<string>",
"trafficPolicy": "any-host",
"allowedHosts": null,
"pollInterval": 60
}
'import requests
url = "https://us.infisical.com/api/v1/agent-vault/proxies"
payload = {
"name": "<string>",
"projectId": "<string>",
"description": "<string>",
"trafficPolicy": "any-host",
"allowedHosts": None,
"pollInterval": 60
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
projectId: '<string>',
description: '<string>',
trafficPolicy: 'any-host',
allowedHosts: null,
pollInterval: 60
})
};
fetch('https://us.infisical.com/api/v1/agent-vault/proxies', 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://us.infisical.com/api/v1/agent-vault/proxies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'projectId' => '<string>',
'description' => '<string>',
'trafficPolicy' => 'any-host',
'allowedHosts' => null,
'pollInterval' => 60
]),
CURLOPT_HTTPHEADER => [
"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://us.infisical.com/api/v1/agent-vault/proxies"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"description\": \"<string>\",\n \"trafficPolicy\": \"any-host\",\n \"allowedHosts\": null,\n \"pollInterval\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://us.infisical.com/api/v1/agent-vault/proxies")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"description\": \"<string>\",\n \"trafficPolicy\": \"any-host\",\n \"allowedHosts\": null,\n \"pollInterval\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/agent-vault/proxies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"description\": \"<string>\",\n \"trafficPolicy\": \"any-host\",\n \"allowedHosts\": null,\n \"pollInterval\": 60\n}"
response = http.request(request)
puts response.read_body{
"proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"heartbeat": "2023-11-07T05:31:56Z",
"isHealthy": true,
"rootCaFingerprint": "<string>",
"rootCaExpiresAt": "2023-11-07T05:31:56Z",
"trafficPolicy": "any-host",
"allowedHosts": "<string>",
"pollInterval": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"proxyToken": "<string>"
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Create proxy
Register an Agent Vault proxy and issue its proxy token
curl --request POST \
--url https://us.infisical.com/api/v1/agent-vault/proxies \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"projectId": "<string>",
"description": "<string>",
"trafficPolicy": "any-host",
"allowedHosts": null,
"pollInterval": 60
}
'import requests
url = "https://us.infisical.com/api/v1/agent-vault/proxies"
payload = {
"name": "<string>",
"projectId": "<string>",
"description": "<string>",
"trafficPolicy": "any-host",
"allowedHosts": None,
"pollInterval": 60
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
projectId: '<string>',
description: '<string>',
trafficPolicy: 'any-host',
allowedHosts: null,
pollInterval: 60
})
};
fetch('https://us.infisical.com/api/v1/agent-vault/proxies', 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://us.infisical.com/api/v1/agent-vault/proxies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'projectId' => '<string>',
'description' => '<string>',
'trafficPolicy' => 'any-host',
'allowedHosts' => null,
'pollInterval' => 60
]),
CURLOPT_HTTPHEADER => [
"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://us.infisical.com/api/v1/agent-vault/proxies"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"description\": \"<string>\",\n \"trafficPolicy\": \"any-host\",\n \"allowedHosts\": null,\n \"pollInterval\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://us.infisical.com/api/v1/agent-vault/proxies")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"description\": \"<string>\",\n \"trafficPolicy\": \"any-host\",\n \"allowedHosts\": null,\n \"pollInterval\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/agent-vault/proxies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"projectId\": \"<string>\",\n \"description\": \"<string>\",\n \"trafficPolicy\": \"any-host\",\n \"allowedHosts\": null,\n \"pollInterval\": 60\n}"
response = http.request(request)
puts response.read_body{
"proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"heartbeat": "2023-11-07T05:31:56Z",
"isHealthy": true,
"rootCaFingerprint": "<string>",
"rootCaExpiresAt": "2023-11-07T05:31:56Z",
"trafficPolicy": "any-host",
"allowedHosts": "<string>",
"pollInterval": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"proxyToken": "<string>"
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Body
The name of the proxy.
1 - 64The ID of the Agent Vault project.
1 - 36A description of what this proxy is for.
256^[^\x00-\x1f\x7f]*$Which hosts an agent may reach through this proxy. any-host lets every request out; service-hosts allows only hosts that the session's services cover, from its access bundle or sent with the session, plus anything in allowedHosts, and refuses the rest with a 403. bundle-hosts is the old name of service-hosts and is still accepted.
any-host, service-hosts, bundle-hosts Hosts that stay reachable under the service-hosts traffic policy even though none of the session's services cover them. Still intercepted, and given no credential.
1024How often, in seconds, the proxy refreshes its sessions and settings. Between 10 and 300.
10 <= x <= 300Was this page helpful?