Set endpoint options
Change the endpoint’s IP allowlist, origin allowlist and log retention. Send at least one of the fields; a field you leave out keeps its current value (list or get endpoints to see the current values). allowed_ips and allowed_origins replace the whole stored list, so resend every entry to keep; an empty list clears it. Each list takes at most 1000 entries. Each allowed_ips entry is an IPv4 address or IPv4 CIDR range. Each allowed_origins entry is * or scheme://host[:port] with no path, query or userinfo; it is stored lowercase without a default port or trailing slash. * admits any browser origin but still refuses callers that send neither an Origin nor a Referer header; an empty list allows every caller. A non-empty allowlist therefore refuses every caller not on it, including servers that send no Origin or Referer header and live production traffic. log_retention_hours is 0 to 48; 0 turns request logs off. Needs a WRITE-scoped key. On plans that do not include it the call returns 403 plan_not_eligible; requests that only clear a list or turn logs off are always allowed. If the plan check cannot reach billing the call returns 503 internal_error and can be retried. Changes usually reach the gateway within about five minutes.
curl --request PATCH \
--url https://api.validationcloud.io/admin/v1/endpoints/{id}/options \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"allowed_ips": [
"<string>"
],
"allowed_origins": [
"<string>"
],
"log_retention_hours": 24
}
'import requests
url = "https://api.validationcloud.io/admin/v1/endpoints/{id}/options"
payload = {
"allowed_ips": ["<string>"],
"allowed_origins": ["<string>"],
"log_retention_hours": 24
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowed_ips: ['<string>'],
allowed_origins: ['<string>'],
log_retention_hours: 24
})
};
fetch('https://api.validationcloud.io/admin/v1/endpoints/{id}/options', 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.validationcloud.io/admin/v1/endpoints/{id}/options",
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([
'allowed_ips' => [
'<string>'
],
'allowed_origins' => [
'<string>'
],
'log_retention_hours' => 24
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.validationcloud.io/admin/v1/endpoints/{id}/options"
payload := strings.NewReader("{\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"allowed_origins\": [\n \"<string>\"\n ],\n \"log_retention_hours\": 24\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.validationcloud.io/admin/v1/endpoints/{id}/options")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"allowed_origins\": [\n \"<string>\"\n ],\n \"log_retention_hours\": 24\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.validationcloud.io/admin/v1/endpoints/{id}/options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"allowed_origins\": [\n \"<string>\"\n ],\n \"log_retention_hours\": 24\n}"
response = http.request(request)
puts response.read_body{
"api_key": "<string>",
"chain": "<string>",
"enabled": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"network": "<string>",
"options": {
"allowed_ips": [
"<string>"
],
"allowed_origins": [
"<string>"
],
"log_retention_hours": 123
},
"urls": {
"https": "<string>",
"wss": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}Authorizations
Admin API key under the ApiKey scheme: Authorization: ApiKey vc_adm_.... Each key is bound to one team and carries a READ or WRITE scope; the usage endpoints require only READ.
Path Parameters
Endpoint UUID
Body
Options to change
curl --request PATCH \
--url https://api.validationcloud.io/admin/v1/endpoints/{id}/options \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"allowed_ips": [
"<string>"
],
"allowed_origins": [
"<string>"
],
"log_retention_hours": 24
}
'import requests
url = "https://api.validationcloud.io/admin/v1/endpoints/{id}/options"
payload = {
"allowed_ips": ["<string>"],
"allowed_origins": ["<string>"],
"log_retention_hours": 24
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowed_ips: ['<string>'],
allowed_origins: ['<string>'],
log_retention_hours: 24
})
};
fetch('https://api.validationcloud.io/admin/v1/endpoints/{id}/options', 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.validationcloud.io/admin/v1/endpoints/{id}/options",
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([
'allowed_ips' => [
'<string>'
],
'allowed_origins' => [
'<string>'
],
'log_retention_hours' => 24
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.validationcloud.io/admin/v1/endpoints/{id}/options"
payload := strings.NewReader("{\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"allowed_origins\": [\n \"<string>\"\n ],\n \"log_retention_hours\": 24\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.validationcloud.io/admin/v1/endpoints/{id}/options")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"allowed_origins\": [\n \"<string>\"\n ],\n \"log_retention_hours\": 24\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.validationcloud.io/admin/v1/endpoints/{id}/options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"allowed_origins\": [\n \"<string>\"\n ],\n \"log_retention_hours\": 24\n}"
response = http.request(request)
puts response.read_body{
"api_key": "<string>",
"chain": "<string>",
"enabled": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"network": "<string>",
"options": {
"allowed_ips": [
"<string>"
],
"allowed_origins": [
"<string>"
],
"log_retention_hours": 123
},
"urls": {
"https": "<string>",
"wss": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}{
"error": {
"code": "invalid_request",
"message": "from must be an RFC3339 timestamp"
}
}