curl --request PUT \
--url https://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Corporate Office IPs",
"description": "Static IPs for our main corporate office.",
"prefixes": [
{
"cidr": "203.0.113.0/28",
"description": "Primary ISP Block"
},
{
"cidr": "198.51.100.10/32",
"description": "Backup ISP"
}
],
"sites": []
}
'import requests
url = "https://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}"
payload = {
"name": "Corporate Office IPs",
"description": "Static IPs for our main corporate office.",
"prefixes": [
{
"cidr": "203.0.113.0/28",
"description": "Primary ISP Block"
},
{
"cidr": "198.51.100.10/32",
"description": "Backup ISP"
}
],
"sites": []
}
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({
name: 'Corporate Office IPs',
description: 'Static IPs for our main corporate office.',
prefixes: [
{cidr: '203.0.113.0/28', description: 'Primary ISP Block'},
{cidr: '198.51.100.10/32', description: 'Backup ISP'}
],
sites: []
})
};
fetch('https://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}', 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://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}",
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([
'name' => 'Corporate Office IPs',
'description' => 'Static IPs for our main corporate office.',
'prefixes' => [
[
'cidr' => '203.0.113.0/28',
'description' => 'Primary ISP Block'
],
[
'cidr' => '198.51.100.10/32',
'description' => 'Backup ISP'
]
],
'sites' => [
]
]),
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://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}"
payload := strings.NewReader("{\n \"name\": \"Corporate Office IPs\",\n \"description\": \"Static IPs for our main corporate office.\",\n \"prefixes\": [\n {\n \"cidr\": \"203.0.113.0/28\",\n \"description\": \"Primary ISP Block\"\n },\n {\n \"cidr\": \"198.51.100.10/32\",\n \"description\": \"Backup ISP\"\n }\n ],\n \"sites\": []\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://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Corporate Office IPs\",\n \"description\": \"Static IPs for our main corporate office.\",\n \"prefixes\": [\n {\n \"cidr\": \"203.0.113.0/28\",\n \"description\": \"Primary ISP Block\"\n },\n {\n \"cidr\": \"198.51.100.10/32\",\n \"description\": \"Backup ISP\"\n }\n ],\n \"sites\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}")
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 \"name\": \"Corporate Office IPs\",\n \"description\": \"Static IPs for our main corporate office.\",\n \"prefixes\": [\n {\n \"cidr\": \"203.0.113.0/28\",\n \"description\": \"Primary ISP Block\"\n },\n {\n \"cidr\": \"198.51.100.10/32\",\n \"description\": \"Backup ISP\"\n }\n ],\n \"sites\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "prfx_lst_0ujsswThIGTUYm2K8FjOOfxcYpw",
"name": "Main Office IPs",
"description": "Public IP ranges for the main office.",
"status": "active",
"sites": [
"site_12345"
],
"prefixes": [
{
"id": "prfx_0ujsswThIGTUYm2K8FjOOfxcYpw",
"cidr": "192.0.2.0/24",
"description": "Main server subnet"
}
]
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Update a prefix list
Updates an existing prefix list by fully replacing its attributes, including its name, description, prefixes, and site associations. This is a full replacement operation (PUT); any omitted fields will result in those items being removed.
curl --request PUT \
--url https://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Corporate Office IPs",
"description": "Static IPs for our main corporate office.",
"prefixes": [
{
"cidr": "203.0.113.0/28",
"description": "Primary ISP Block"
},
{
"cidr": "198.51.100.10/32",
"description": "Backup ISP"
}
],
"sites": []
}
'import requests
url = "https://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}"
payload = {
"name": "Corporate Office IPs",
"description": "Static IPs for our main corporate office.",
"prefixes": [
{
"cidr": "203.0.113.0/28",
"description": "Primary ISP Block"
},
{
"cidr": "198.51.100.10/32",
"description": "Backup ISP"
}
],
"sites": []
}
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({
name: 'Corporate Office IPs',
description: 'Static IPs for our main corporate office.',
prefixes: [
{cidr: '203.0.113.0/28', description: 'Primary ISP Block'},
{cidr: '198.51.100.10/32', description: 'Backup ISP'}
],
sites: []
})
};
fetch('https://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}', 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://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}",
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([
'name' => 'Corporate Office IPs',
'description' => 'Static IPs for our main corporate office.',
'prefixes' => [
[
'cidr' => '203.0.113.0/28',
'description' => 'Primary ISP Block'
],
[
'cidr' => '198.51.100.10/32',
'description' => 'Backup ISP'
]
],
'sites' => [
]
]),
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://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}"
payload := strings.NewReader("{\n \"name\": \"Corporate Office IPs\",\n \"description\": \"Static IPs for our main corporate office.\",\n \"prefixes\": [\n {\n \"cidr\": \"203.0.113.0/28\",\n \"description\": \"Primary ISP Block\"\n },\n {\n \"cidr\": \"198.51.100.10/32\",\n \"description\": \"Backup ISP\"\n }\n ],\n \"sites\": []\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://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Corporate Office IPs\",\n \"description\": \"Static IPs for our main corporate office.\",\n \"prefixes\": [\n {\n \"cidr\": \"203.0.113.0/28\",\n \"description\": \"Primary ISP Block\"\n },\n {\n \"cidr\": \"198.51.100.10/32\",\n \"description\": \"Backup ISP\"\n }\n ],\n \"sites\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/vpc/prefix-lists/{prefixListId}")
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 \"name\": \"Corporate Office IPs\",\n \"description\": \"Static IPs for our main corporate office.\",\n \"prefixes\": [\n {\n \"cidr\": \"203.0.113.0/28\",\n \"description\": \"Primary ISP Block\"\n },\n {\n \"cidr\": \"198.51.100.10/32\",\n \"description\": \"Backup ISP\"\n }\n ],\n \"sites\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "prfx_lst_0ujsswThIGTUYm2K8FjOOfxcYpw",
"name": "Main Office IPs",
"description": "Public IP ranges for the main office.",
"status": "active",
"sites": [
"site_12345"
],
"prefixes": [
{
"id": "prfx_0ujsswThIGTUYm2K8FjOOfxcYpw",
"cidr": "192.0.2.0/24",
"description": "Main server subnet"
}
]
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Authorizations
Authentication is performed via an Auth0-issued JSON Web Token (JWT). Provide the token in the Authorization header with the Bearer scheme.
Path Parameters
The unique identifier for the prefix list to update.
^prfx_lst_[0-9a-zA-Z]{27}$"prfx_lst_0ujsswThIGTUYm2K8FjOOfxcYpw"
Body
The new state for the prefix list.
Defines the writable properties for creating or updating a prefix list.
A human-readable name for the prefix list.
255"Third-Party API Endpoints"
A list of prefixes (CIDR blocks). The entire list is replaced on update.
500Show child attributes
Show child attributes
A list of site IDs where this prefix list should be directly applied. The entire list of sites is replaced on update.
An optional description for the prefix list.
1000"Static IPs for services we integrate with."
Response
The updated prefix list object.
Represents a reusable, named collection of IP addresses and CIDR blocks.
The unique identifier for the prefix list, prefixed with prfx_lst_.
"prfx_lst_0ujsswThIGTUYm2K8FjOOfxcYpw"
A human-readable name for the prefix list.
"Main Office IPs"
An optional description for the prefix list.
"Public IP ranges for the main office."
The current synchronization status of the prefix list.
active, syncing, failed "active"
A list of site IDs where this prefix list is directly applied.
The list of CIDR blocks in this prefix list.
Show child attributes
Show child attributes
Was this page helpful?