curl --request POST \
--url https://console.advinservers.com/api/v1/client/transfers/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"moves": [
{
"resource": "server",
"uuids": [
"ecc6f4f1-c89b-4dce-a20b-a330641c5b0b",
"304e1794-a5b7-41f2-9a20-c0d444eb6683"
]
},
{
"resource": "iso",
"uuids": [
"ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b"
]
},
{
"resource": "firewall_group",
"uuids": [
"72a4a737-236f-456f-827f-6145d9c95727"
]
},
{
"resource": "firewall_ip_group",
"uuids": [
"145e6e6f-a6b0-4b9e-9060-2d4f017baff8"
]
},
{
"resource": "private_network",
"uuids": [
"5220f263-0e8e-4917-bf4f-4cae109ca4c5"
]
},
{
"resource": "floating_ip",
"uuids": [
"1b8349e5-3568-43e0-bf89-fc3350dd7a08"
]
}
],
"team": "48454223-c5ac-461f-bead-ba8dda13eea9"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/transfers/quote"
payload = {
"moves": [
{
"resource": "server",
"uuids": ["ecc6f4f1-c89b-4dce-a20b-a330641c5b0b", "304e1794-a5b7-41f2-9a20-c0d444eb6683"]
},
{
"resource": "iso",
"uuids": ["ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b"]
},
{
"resource": "firewall_group",
"uuids": ["72a4a737-236f-456f-827f-6145d9c95727"]
},
{
"resource": "firewall_ip_group",
"uuids": ["145e6e6f-a6b0-4b9e-9060-2d4f017baff8"]
},
{
"resource": "private_network",
"uuids": ["5220f263-0e8e-4917-bf4f-4cae109ca4c5"]
},
{
"resource": "floating_ip",
"uuids": ["1b8349e5-3568-43e0-bf89-fc3350dd7a08"]
}
],
"team": "48454223-c5ac-461f-bead-ba8dda13eea9"
}
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({
moves: [
{
resource: 'server',
uuids: ['ecc6f4f1-c89b-4dce-a20b-a330641c5b0b', '304e1794-a5b7-41f2-9a20-c0d444eb6683']
},
{resource: 'iso', uuids: ['ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b']},
{resource: 'firewall_group', uuids: ['72a4a737-236f-456f-827f-6145d9c95727']},
{resource: 'firewall_ip_group', uuids: ['145e6e6f-a6b0-4b9e-9060-2d4f017baff8']},
{resource: 'private_network', uuids: ['5220f263-0e8e-4917-bf4f-4cae109ca4c5']},
{resource: 'floating_ip', uuids: ['1b8349e5-3568-43e0-bf89-fc3350dd7a08']}
],
team: '48454223-c5ac-461f-bead-ba8dda13eea9'
})
};
fetch('https://console.advinservers.com/api/v1/client/transfers/quote', 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://console.advinservers.com/api/v1/client/transfers/quote",
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([
'moves' => [
[
'resource' => 'server',
'uuids' => [
'ecc6f4f1-c89b-4dce-a20b-a330641c5b0b',
'304e1794-a5b7-41f2-9a20-c0d444eb6683'
]
],
[
'resource' => 'iso',
'uuids' => [
'ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b'
]
],
[
'resource' => 'firewall_group',
'uuids' => [
'72a4a737-236f-456f-827f-6145d9c95727'
]
],
[
'resource' => 'firewall_ip_group',
'uuids' => [
'145e6e6f-a6b0-4b9e-9060-2d4f017baff8'
]
],
[
'resource' => 'private_network',
'uuids' => [
'5220f263-0e8e-4917-bf4f-4cae109ca4c5'
]
],
[
'resource' => 'floating_ip',
'uuids' => [
'1b8349e5-3568-43e0-bf89-fc3350dd7a08'
]
]
],
'team' => '48454223-c5ac-461f-bead-ba8dda13eea9'
]),
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://console.advinservers.com/api/v1/client/transfers/quote"
payload := strings.NewReader("{\n \"moves\": [\n {\n \"resource\": \"server\",\n \"uuids\": [\n \"ecc6f4f1-c89b-4dce-a20b-a330641c5b0b\",\n \"304e1794-a5b7-41f2-9a20-c0d444eb6683\"\n ]\n },\n {\n \"resource\": \"iso\",\n \"uuids\": [\n \"ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b\"\n ]\n },\n {\n \"resource\": \"firewall_group\",\n \"uuids\": [\n \"72a4a737-236f-456f-827f-6145d9c95727\"\n ]\n },\n {\n \"resource\": \"firewall_ip_group\",\n \"uuids\": [\n \"145e6e6f-a6b0-4b9e-9060-2d4f017baff8\"\n ]\n },\n {\n \"resource\": \"private_network\",\n \"uuids\": [\n \"5220f263-0e8e-4917-bf4f-4cae109ca4c5\"\n ]\n },\n {\n \"resource\": \"floating_ip\",\n \"uuids\": [\n \"1b8349e5-3568-43e0-bf89-fc3350dd7a08\"\n ]\n }\n ],\n \"team\": \"48454223-c5ac-461f-bead-ba8dda13eea9\"\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://console.advinservers.com/api/v1/client/transfers/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"moves\": [\n {\n \"resource\": \"server\",\n \"uuids\": [\n \"ecc6f4f1-c89b-4dce-a20b-a330641c5b0b\",\n \"304e1794-a5b7-41f2-9a20-c0d444eb6683\"\n ]\n },\n {\n \"resource\": \"iso\",\n \"uuids\": [\n \"ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b\"\n ]\n },\n {\n \"resource\": \"firewall_group\",\n \"uuids\": [\n \"72a4a737-236f-456f-827f-6145d9c95727\"\n ]\n },\n {\n \"resource\": \"firewall_ip_group\",\n \"uuids\": [\n \"145e6e6f-a6b0-4b9e-9060-2d4f017baff8\"\n ]\n },\n {\n \"resource\": \"private_network\",\n \"uuids\": [\n \"5220f263-0e8e-4917-bf4f-4cae109ca4c5\"\n ]\n },\n {\n \"resource\": \"floating_ip\",\n \"uuids\": [\n \"1b8349e5-3568-43e0-bf89-fc3350dd7a08\"\n ]\n }\n ],\n \"team\": \"48454223-c5ac-461f-bead-ba8dda13eea9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/transfers/quote")
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 \"moves\": [\n {\n \"resource\": \"server\",\n \"uuids\": [\n \"ecc6f4f1-c89b-4dce-a20b-a330641c5b0b\",\n \"304e1794-a5b7-41f2-9a20-c0d444eb6683\"\n ]\n },\n {\n \"resource\": \"iso\",\n \"uuids\": [\n \"ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b\"\n ]\n },\n {\n \"resource\": \"firewall_group\",\n \"uuids\": [\n \"72a4a737-236f-456f-827f-6145d9c95727\"\n ]\n },\n {\n \"resource\": \"firewall_ip_group\",\n \"uuids\": [\n \"145e6e6f-a6b0-4b9e-9060-2d4f017baff8\"\n ]\n },\n {\n \"resource\": \"private_network\",\n \"uuids\": [\n \"5220f263-0e8e-4917-bf4f-4cae109ca4c5\"\n ]\n },\n {\n \"resource\": \"floating_ip\",\n \"uuids\": [\n \"1b8349e5-3568-43e0-bf89-fc3350dd7a08\"\n ]\n }\n ],\n \"team\": \"48454223-c5ac-461f-bead-ba8dda13eea9\"\n}"
response = http.request(request)
puts response.read_body{
"ends_prepaid_billing": true,
"credit": "4.12",
"currency": "USD"
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Preview the credit from a move to a postpaid team
Overview
Takes the same team and moves as the transfer endpoint and says what the move would do to billing, without moving or changing anything. Use it before sending accept_postpaid: true.
ends_prepaid_billing is true when the move would end prepaid billing for any of the resources. credit is then the unused paid time that would be added to account credit, as a decimal string in currency. Both are null when the move would not change how anything is billed. The amount is worked out for the current moment, so the move itself may credit slightly less a few minutes later.
The same checks as the move apply, so a move that would be refused is refused here with the same reason.
Permissions
Requires one of the server.transfer (Transfer servers to their own account), network.transfer (Transfer floating IPs to their own account) or snapshot.transfer (Transfer snapshot storage to their own account) permissions for the selected team, depending on the request. Resources outside that team return 404.
curl --request POST \
--url https://console.advinservers.com/api/v1/client/transfers/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"moves": [
{
"resource": "server",
"uuids": [
"ecc6f4f1-c89b-4dce-a20b-a330641c5b0b",
"304e1794-a5b7-41f2-9a20-c0d444eb6683"
]
},
{
"resource": "iso",
"uuids": [
"ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b"
]
},
{
"resource": "firewall_group",
"uuids": [
"72a4a737-236f-456f-827f-6145d9c95727"
]
},
{
"resource": "firewall_ip_group",
"uuids": [
"145e6e6f-a6b0-4b9e-9060-2d4f017baff8"
]
},
{
"resource": "private_network",
"uuids": [
"5220f263-0e8e-4917-bf4f-4cae109ca4c5"
]
},
{
"resource": "floating_ip",
"uuids": [
"1b8349e5-3568-43e0-bf89-fc3350dd7a08"
]
}
],
"team": "48454223-c5ac-461f-bead-ba8dda13eea9"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/transfers/quote"
payload = {
"moves": [
{
"resource": "server",
"uuids": ["ecc6f4f1-c89b-4dce-a20b-a330641c5b0b", "304e1794-a5b7-41f2-9a20-c0d444eb6683"]
},
{
"resource": "iso",
"uuids": ["ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b"]
},
{
"resource": "firewall_group",
"uuids": ["72a4a737-236f-456f-827f-6145d9c95727"]
},
{
"resource": "firewall_ip_group",
"uuids": ["145e6e6f-a6b0-4b9e-9060-2d4f017baff8"]
},
{
"resource": "private_network",
"uuids": ["5220f263-0e8e-4917-bf4f-4cae109ca4c5"]
},
{
"resource": "floating_ip",
"uuids": ["1b8349e5-3568-43e0-bf89-fc3350dd7a08"]
}
],
"team": "48454223-c5ac-461f-bead-ba8dda13eea9"
}
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({
moves: [
{
resource: 'server',
uuids: ['ecc6f4f1-c89b-4dce-a20b-a330641c5b0b', '304e1794-a5b7-41f2-9a20-c0d444eb6683']
},
{resource: 'iso', uuids: ['ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b']},
{resource: 'firewall_group', uuids: ['72a4a737-236f-456f-827f-6145d9c95727']},
{resource: 'firewall_ip_group', uuids: ['145e6e6f-a6b0-4b9e-9060-2d4f017baff8']},
{resource: 'private_network', uuids: ['5220f263-0e8e-4917-bf4f-4cae109ca4c5']},
{resource: 'floating_ip', uuids: ['1b8349e5-3568-43e0-bf89-fc3350dd7a08']}
],
team: '48454223-c5ac-461f-bead-ba8dda13eea9'
})
};
fetch('https://console.advinservers.com/api/v1/client/transfers/quote', 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://console.advinservers.com/api/v1/client/transfers/quote",
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([
'moves' => [
[
'resource' => 'server',
'uuids' => [
'ecc6f4f1-c89b-4dce-a20b-a330641c5b0b',
'304e1794-a5b7-41f2-9a20-c0d444eb6683'
]
],
[
'resource' => 'iso',
'uuids' => [
'ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b'
]
],
[
'resource' => 'firewall_group',
'uuids' => [
'72a4a737-236f-456f-827f-6145d9c95727'
]
],
[
'resource' => 'firewall_ip_group',
'uuids' => [
'145e6e6f-a6b0-4b9e-9060-2d4f017baff8'
]
],
[
'resource' => 'private_network',
'uuids' => [
'5220f263-0e8e-4917-bf4f-4cae109ca4c5'
]
],
[
'resource' => 'floating_ip',
'uuids' => [
'1b8349e5-3568-43e0-bf89-fc3350dd7a08'
]
]
],
'team' => '48454223-c5ac-461f-bead-ba8dda13eea9'
]),
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://console.advinservers.com/api/v1/client/transfers/quote"
payload := strings.NewReader("{\n \"moves\": [\n {\n \"resource\": \"server\",\n \"uuids\": [\n \"ecc6f4f1-c89b-4dce-a20b-a330641c5b0b\",\n \"304e1794-a5b7-41f2-9a20-c0d444eb6683\"\n ]\n },\n {\n \"resource\": \"iso\",\n \"uuids\": [\n \"ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b\"\n ]\n },\n {\n \"resource\": \"firewall_group\",\n \"uuids\": [\n \"72a4a737-236f-456f-827f-6145d9c95727\"\n ]\n },\n {\n \"resource\": \"firewall_ip_group\",\n \"uuids\": [\n \"145e6e6f-a6b0-4b9e-9060-2d4f017baff8\"\n ]\n },\n {\n \"resource\": \"private_network\",\n \"uuids\": [\n \"5220f263-0e8e-4917-bf4f-4cae109ca4c5\"\n ]\n },\n {\n \"resource\": \"floating_ip\",\n \"uuids\": [\n \"1b8349e5-3568-43e0-bf89-fc3350dd7a08\"\n ]\n }\n ],\n \"team\": \"48454223-c5ac-461f-bead-ba8dda13eea9\"\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://console.advinservers.com/api/v1/client/transfers/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"moves\": [\n {\n \"resource\": \"server\",\n \"uuids\": [\n \"ecc6f4f1-c89b-4dce-a20b-a330641c5b0b\",\n \"304e1794-a5b7-41f2-9a20-c0d444eb6683\"\n ]\n },\n {\n \"resource\": \"iso\",\n \"uuids\": [\n \"ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b\"\n ]\n },\n {\n \"resource\": \"firewall_group\",\n \"uuids\": [\n \"72a4a737-236f-456f-827f-6145d9c95727\"\n ]\n },\n {\n \"resource\": \"firewall_ip_group\",\n \"uuids\": [\n \"145e6e6f-a6b0-4b9e-9060-2d4f017baff8\"\n ]\n },\n {\n \"resource\": \"private_network\",\n \"uuids\": [\n \"5220f263-0e8e-4917-bf4f-4cae109ca4c5\"\n ]\n },\n {\n \"resource\": \"floating_ip\",\n \"uuids\": [\n \"1b8349e5-3568-43e0-bf89-fc3350dd7a08\"\n ]\n }\n ],\n \"team\": \"48454223-c5ac-461f-bead-ba8dda13eea9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/transfers/quote")
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 \"moves\": [\n {\n \"resource\": \"server\",\n \"uuids\": [\n \"ecc6f4f1-c89b-4dce-a20b-a330641c5b0b\",\n \"304e1794-a5b7-41f2-9a20-c0d444eb6683\"\n ]\n },\n {\n \"resource\": \"iso\",\n \"uuids\": [\n \"ec4fa5b5-cc7c-4fcf-b280-ee55eca8d44b\"\n ]\n },\n {\n \"resource\": \"firewall_group\",\n \"uuids\": [\n \"72a4a737-236f-456f-827f-6145d9c95727\"\n ]\n },\n {\n \"resource\": \"firewall_ip_group\",\n \"uuids\": [\n \"145e6e6f-a6b0-4b9e-9060-2d4f017baff8\"\n ]\n },\n {\n \"resource\": \"private_network\",\n \"uuids\": [\n \"5220f263-0e8e-4917-bf4f-4cae109ca4c5\"\n ]\n },\n {\n \"resource\": \"floating_ip\",\n \"uuids\": [\n \"1b8349e5-3568-43e0-bf89-fc3350dd7a08\"\n ]\n }\n ],\n \"team\": \"48454223-c5ac-461f-bead-ba8dda13eea9\"\n}"
response = http.request(request)
puts response.read_body{
"ends_prepaid_billing": true,
"credit": "4.12",
"currency": "USD"
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Authorizations
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Body
Send a JSON object containing the fields below. Required fields are marked in the schema.
Response
The record, as a JSON object. There is no envelope.