curl --request PATCH \
--url https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"hostPattern": "<string>",
"allowedMethods": [],
"allowedPathPrefixes": [
"<string>"
],
"credential": {
"type": "bearer",
"headerName": "<string>",
"headerPrefix": "<string>",
"value": "<string>"
},
"customHeaders": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prefix": "<string>",
"value": "<string>"
}
],
"substitutions": [
{
"placeholder": "<string>",
"surfaces": [],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
]
}
'import requests
url = "https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}"
payload = {
"name": "<string>",
"hostPattern": "<string>",
"allowedMethods": [],
"allowedPathPrefixes": ["<string>"],
"credential": {
"type": "bearer",
"headerName": "<string>",
"headerPrefix": "<string>",
"value": "<string>"
},
"customHeaders": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prefix": "<string>",
"value": "<string>"
}
],
"substitutions": [
{
"placeholder": "<string>",
"surfaces": [],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
hostPattern: '<string>',
allowedMethods: [],
allowedPathPrefixes: ['<string>'],
credential: {
type: 'bearer',
headerName: '<string>',
headerPrefix: '<string>',
value: '<string>'
},
customHeaders: [
{
name: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
prefix: '<string>',
value: '<string>'
}
],
substitutions: [
{
placeholder: '<string>',
surfaces: [],
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
value: '<string>'
}
]
})
};
fetch('https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}', 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/access-bundles/{accessBundleId}/services/{serviceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'hostPattern' => '<string>',
'allowedMethods' => [
],
'allowedPathPrefixes' => [
'<string>'
],
'credential' => [
'type' => 'bearer',
'headerName' => '<string>',
'headerPrefix' => '<string>',
'value' => '<string>'
],
'customHeaders' => [
[
'name' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'prefix' => '<string>',
'value' => '<string>'
]
],
'substitutions' => [
[
'placeholder' => '<string>',
'surfaces' => [
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>'
]
]
]),
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/access-bundles/{accessBundleId}/services/{serviceId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"hostPattern\": \"<string>\",\n \"allowedMethods\": [],\n \"allowedPathPrefixes\": [\n \"<string>\"\n ],\n \"credential\": {\n \"type\": \"bearer\",\n \"headerName\": \"<string>\",\n \"headerPrefix\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"customHeaders\": [\n {\n \"name\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"prefix\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"substitutions\": [\n {\n \"placeholder\": \"<string>\",\n \"surfaces\": [],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"hostPattern\": \"<string>\",\n \"allowedMethods\": [],\n \"allowedPathPrefixes\": [\n \"<string>\"\n ],\n \"credential\": {\n \"type\": \"bearer\",\n \"headerName\": \"<string>\",\n \"headerPrefix\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"customHeaders\": [\n {\n \"name\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"prefix\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"substitutions\": [\n {\n \"placeholder\": \"<string>\",\n \"surfaces\": [],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"hostPattern\": \"<string>\",\n \"allowedMethods\": [],\n \"allowedPathPrefixes\": [\n \"<string>\"\n ],\n \"credential\": {\n \"type\": \"bearer\",\n \"headerName\": \"<string>\",\n \"headerPrefix\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"customHeaders\": [\n {\n \"name\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"prefix\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"substitutions\": [\n {\n \"placeholder\": \"<string>\",\n \"surfaces\": [],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accessBundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"hostPattern": "<string>",
"allowedMethods": [
"GET"
],
"allowedPathPrefixes": [
"<string>"
],
"credential": {
"type": "bearer",
"headerName": "<string>",
"headerPrefix": "<string>"
},
"customHeaders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"prefix": "<string>"
}
],
"substitutions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"placeholder": "<string>",
"surfaces": [
"path"
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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>"
}Update service
Update a service in an Agent Vault access bundle
curl --request PATCH \
--url https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"hostPattern": "<string>",
"allowedMethods": [],
"allowedPathPrefixes": [
"<string>"
],
"credential": {
"type": "bearer",
"headerName": "<string>",
"headerPrefix": "<string>",
"value": "<string>"
},
"customHeaders": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prefix": "<string>",
"value": "<string>"
}
],
"substitutions": [
{
"placeholder": "<string>",
"surfaces": [],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
]
}
'import requests
url = "https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}"
payload = {
"name": "<string>",
"hostPattern": "<string>",
"allowedMethods": [],
"allowedPathPrefixes": ["<string>"],
"credential": {
"type": "bearer",
"headerName": "<string>",
"headerPrefix": "<string>",
"value": "<string>"
},
"customHeaders": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prefix": "<string>",
"value": "<string>"
}
],
"substitutions": [
{
"placeholder": "<string>",
"surfaces": [],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
hostPattern: '<string>',
allowedMethods: [],
allowedPathPrefixes: ['<string>'],
credential: {
type: 'bearer',
headerName: '<string>',
headerPrefix: '<string>',
value: '<string>'
},
customHeaders: [
{
name: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
prefix: '<string>',
value: '<string>'
}
],
substitutions: [
{
placeholder: '<string>',
surfaces: [],
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
value: '<string>'
}
]
})
};
fetch('https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}', 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/access-bundles/{accessBundleId}/services/{serviceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'hostPattern' => '<string>',
'allowedMethods' => [
],
'allowedPathPrefixes' => [
'<string>'
],
'credential' => [
'type' => 'bearer',
'headerName' => '<string>',
'headerPrefix' => '<string>',
'value' => '<string>'
],
'customHeaders' => [
[
'name' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'prefix' => '<string>',
'value' => '<string>'
]
],
'substitutions' => [
[
'placeholder' => '<string>',
'surfaces' => [
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>'
]
]
]),
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/access-bundles/{accessBundleId}/services/{serviceId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"hostPattern\": \"<string>\",\n \"allowedMethods\": [],\n \"allowedPathPrefixes\": [\n \"<string>\"\n ],\n \"credential\": {\n \"type\": \"bearer\",\n \"headerName\": \"<string>\",\n \"headerPrefix\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"customHeaders\": [\n {\n \"name\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"prefix\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"substitutions\": [\n {\n \"placeholder\": \"<string>\",\n \"surfaces\": [],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"hostPattern\": \"<string>\",\n \"allowedMethods\": [],\n \"allowedPathPrefixes\": [\n \"<string>\"\n ],\n \"credential\": {\n \"type\": \"bearer\",\n \"headerName\": \"<string>\",\n \"headerPrefix\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"customHeaders\": [\n {\n \"name\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"prefix\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"substitutions\": [\n {\n \"placeholder\": \"<string>\",\n \"surfaces\": [],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"hostPattern\": \"<string>\",\n \"allowedMethods\": [],\n \"allowedPathPrefixes\": [\n \"<string>\"\n ],\n \"credential\": {\n \"type\": \"bearer\",\n \"headerName\": \"<string>\",\n \"headerPrefix\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"customHeaders\": [\n {\n \"name\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"prefix\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"substitutions\": [\n {\n \"placeholder\": \"<string>\",\n \"surfaces\": [],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accessBundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"hostPattern": "<string>",
"allowedMethods": [
"GET"
],
"allowedPathPrefixes": [
"<string>"
],
"credential": {
"type": "bearer",
"headerName": "<string>",
"headerPrefix": "<string>"
},
"customHeaders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"prefix": "<string>"
}
],
"substitutions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"placeholder": "<string>",
"surfaces": [
"path"
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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>"
}Path Parameters
The ID of the access bundle.
The ID of the service.
Body
The name of the service.
1 - 64A comma-separated set of hosts this service covers, each optionally with a port (defaults to 443). A leading *. wildcard matches exactly one label. Paths are not supported.
1024The HTTP methods this service allows. Null allows every method. Anything else is refused by the proxy with a 403.
1 - 7 elementsGET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS The path prefixes this service allows, matched on whole segments, so /repos covers /repos/octo but not /repositories. null allows every path. A path-restricted service also refuses any request whose path would have to be normalised to judge.
1 - 20 elements- Bearer
- Basic Auth
- Pass-through
Show child attributes
Show child attributes
Additional headers the proxy attaches to every request to this service, on top of the credential. Send the full list. A header you leave out is deleted. Send a header's id to change it in place and keep its stored value. Without an id, a header is matched by name.
20Show child attributes
Show child attributes
Placeholders the proxy swaps for a real secret before forwarding. Send the full list. A substitution you leave out is deleted. Send a substitution's id to change it in place and keep its stored value. Without an id, it is matched by its placeholder.
20Show child attributes
Show child attributes
Response
Default Response
Show child attributes
Show child attributes
Was this page helpful?