Update Tunnel Priorities
curl --request POST \
--url https://v1.api.altostrat.io/wan/{site_id}/failover/priorities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"priorities": [
{
"id": "9c6934c9-586b-47e5-9c59-8669911e8609",
"priority": 1
},
{
"id": "9c6934ca-8a71-46ca-9781-64d88e0b621e",
"priority": 2
}
]
}
'import requests
url = "https://v1.api.altostrat.io/wan/{site_id}/failover/priorities"
payload = { "priorities": [
{
"id": "9c6934c9-586b-47e5-9c59-8669911e8609",
"priority": 1
},
{
"id": "9c6934ca-8a71-46ca-9781-64d88e0b621e",
"priority": 2
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
priorities: [
{id: '9c6934c9-586b-47e5-9c59-8669911e8609', priority: 1},
{id: '9c6934ca-8a71-46ca-9781-64d88e0b621e', priority: 2}
]
})
};
fetch('https://v1.api.altostrat.io/wan/{site_id}/failover/priorities', 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/wan/{site_id}/failover/priorities",
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([
'priorities' => [
[
'id' => '9c6934c9-586b-47e5-9c59-8669911e8609',
'priority' => 1
],
[
'id' => '9c6934ca-8a71-46ca-9781-64d88e0b621e',
'priority' => 2
]
]
]),
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/wan/{site_id}/failover/priorities"
payload := strings.NewReader("{\n \"priorities\": [\n {\n \"id\": \"9c6934c9-586b-47e5-9c59-8669911e8609\",\n \"priority\": 1\n },\n {\n \"id\": \"9c6934ca-8a71-46ca-9781-64d88e0b621e\",\n \"priority\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://v1.api.altostrat.io/wan/{site_id}/failover/priorities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"priorities\": [\n {\n \"id\": \"9c6934c9-586b-47e5-9c59-8669911e8609\",\n \"priority\": 1\n },\n {\n \"id\": \"9c6934ca-8a71-46ca-9781-64d88e0b621e\",\n \"priority\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/wan/{site_id}/failover/priorities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"priorities\": [\n {\n \"id\": \"9c6934c9-586b-47e5-9c59-8669911e8609\",\n \"priority\": 1\n },\n {\n \"id\": \"9c6934ca-8a71-46ca-9781-64d88e0b621e\",\n \"priority\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "9c6934c9-586b-47e5-9c59-8669911e8609",
"priority": 1
}
]{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}WAN Tunnels
Update Tunnel Priorities
Re-orders the failover priority for all tunnels associated with a site. This is an atomic operation; you must provide a complete list of all tunnels and their desired new priorities. The lowest number represents the highest priority.
POST
/
wan
/
{site_id}
/
failover
/
priorities
Update Tunnel Priorities
curl --request POST \
--url https://v1.api.altostrat.io/wan/{site_id}/failover/priorities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"priorities": [
{
"id": "9c6934c9-586b-47e5-9c59-8669911e8609",
"priority": 1
},
{
"id": "9c6934ca-8a71-46ca-9781-64d88e0b621e",
"priority": 2
}
]
}
'import requests
url = "https://v1.api.altostrat.io/wan/{site_id}/failover/priorities"
payload = { "priorities": [
{
"id": "9c6934c9-586b-47e5-9c59-8669911e8609",
"priority": 1
},
{
"id": "9c6934ca-8a71-46ca-9781-64d88e0b621e",
"priority": 2
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
priorities: [
{id: '9c6934c9-586b-47e5-9c59-8669911e8609', priority: 1},
{id: '9c6934ca-8a71-46ca-9781-64d88e0b621e', priority: 2}
]
})
};
fetch('https://v1.api.altostrat.io/wan/{site_id}/failover/priorities', 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/wan/{site_id}/failover/priorities",
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([
'priorities' => [
[
'id' => '9c6934c9-586b-47e5-9c59-8669911e8609',
'priority' => 1
],
[
'id' => '9c6934ca-8a71-46ca-9781-64d88e0b621e',
'priority' => 2
]
]
]),
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/wan/{site_id}/failover/priorities"
payload := strings.NewReader("{\n \"priorities\": [\n {\n \"id\": \"9c6934c9-586b-47e5-9c59-8669911e8609\",\n \"priority\": 1\n },\n {\n \"id\": \"9c6934ca-8a71-46ca-9781-64d88e0b621e\",\n \"priority\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://v1.api.altostrat.io/wan/{site_id}/failover/priorities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"priorities\": [\n {\n \"id\": \"9c6934c9-586b-47e5-9c59-8669911e8609\",\n \"priority\": 1\n },\n {\n \"id\": \"9c6934ca-8a71-46ca-9781-64d88e0b621e\",\n \"priority\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/wan/{site_id}/failover/priorities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"priorities\": [\n {\n \"id\": \"9c6934c9-586b-47e5-9c59-8669911e8609\",\n \"priority\": 1\n },\n {\n \"id\": \"9c6934ca-8a71-46ca-9781-64d88e0b621e\",\n \"priority\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "9c6934c9-586b-47e5-9c59-8669911e8609",
"priority": 1
}
]{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The value for 'type' must be one of the supported connection types.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}Authorizations
Enter your JWT in the format: Bearer
Path Parameters
The unique identifier for the site.
Example:
"9c69345c-8d39-4786-9f17-8153c988c89a"
Body
application/json
A complete list of tunnels and their new priorities.
Show child attributes
Show child attributes
Was this page helpful?
⌘I