Vps
Post vpsquote
POST
/
vps
/
quote
cURL
curl --request POST \
--url https://kennhosting.com/api/v1/vps/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"server_type": "<string>",
"location": "<string>",
"image": "<string>",
"name": "<string>",
"ipv4": true,
"ipv6": true,
"backups": true,
"volume_size_gb": 5000,
"ssh_keys": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"firewalls": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"networks": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"user_data": "<string>"
}
'import requests
url = "https://kennhosting.com/api/v1/vps/quote"
payload = {
"server_type": "<string>",
"location": "<string>",
"image": "<string>",
"name": "<string>",
"ipv4": True,
"ipv6": True,
"backups": True,
"volume_size_gb": 5000,
"ssh_keys": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"firewalls": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"networks": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"user_data": "<string>"
}
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({
server_type: '<string>',
location: '<string>',
image: '<string>',
name: '<string>',
ipv4: true,
ipv6: true,
backups: true,
volume_size_gb: 5000,
ssh_keys: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
firewalls: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
networks: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
user_data: '<string>'
})
};
fetch('https://kennhosting.com/api/v1/vps/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://kennhosting.com/api/v1/vps/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([
'server_type' => '<string>',
'location' => '<string>',
'image' => '<string>',
'name' => '<string>',
'ipv4' => true,
'ipv6' => true,
'backups' => true,
'volume_size_gb' => 5000,
'ssh_keys' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'firewalls' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'networks' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'user_data' => '<string>'
]),
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://kennhosting.com/api/v1/vps/quote"
payload := strings.NewReader("{\n \"server_type\": \"<string>\",\n \"location\": \"<string>\",\n \"image\": \"<string>\",\n \"name\": \"<string>\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"backups\": true,\n \"volume_size_gb\": 5000,\n \"ssh_keys\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"firewalls\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"networks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"user_data\": \"<string>\"\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://kennhosting.com/api/v1/vps/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"server_type\": \"<string>\",\n \"location\": \"<string>\",\n \"image\": \"<string>\",\n \"name\": \"<string>\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"backups\": true,\n \"volume_size_gb\": 5000,\n \"ssh_keys\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"firewalls\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"networks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"user_data\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://kennhosting.com/api/v1/vps/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 \"server_type\": \"<string>\",\n \"location\": \"<string>\",\n \"image\": \"<string>\",\n \"name\": \"<string>\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"backups\": true,\n \"volume_size_gb\": 5000,\n \"ssh_keys\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"firewalls\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"networks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"user_data\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Authorizations
Body
application/json
Response
The response is of type object.
⌘I
cURL
curl --request POST \
--url https://kennhosting.com/api/v1/vps/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"server_type": "<string>",
"location": "<string>",
"image": "<string>",
"name": "<string>",
"ipv4": true,
"ipv6": true,
"backups": true,
"volume_size_gb": 5000,
"ssh_keys": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"firewalls": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"networks": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"user_data": "<string>"
}
'import requests
url = "https://kennhosting.com/api/v1/vps/quote"
payload = {
"server_type": "<string>",
"location": "<string>",
"image": "<string>",
"name": "<string>",
"ipv4": True,
"ipv6": True,
"backups": True,
"volume_size_gb": 5000,
"ssh_keys": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"firewalls": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"networks": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"user_data": "<string>"
}
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({
server_type: '<string>',
location: '<string>',
image: '<string>',
name: '<string>',
ipv4: true,
ipv6: true,
backups: true,
volume_size_gb: 5000,
ssh_keys: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
firewalls: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
networks: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
user_data: '<string>'
})
};
fetch('https://kennhosting.com/api/v1/vps/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://kennhosting.com/api/v1/vps/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([
'server_type' => '<string>',
'location' => '<string>',
'image' => '<string>',
'name' => '<string>',
'ipv4' => true,
'ipv6' => true,
'backups' => true,
'volume_size_gb' => 5000,
'ssh_keys' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'firewalls' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'networks' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'user_data' => '<string>'
]),
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://kennhosting.com/api/v1/vps/quote"
payload := strings.NewReader("{\n \"server_type\": \"<string>\",\n \"location\": \"<string>\",\n \"image\": \"<string>\",\n \"name\": \"<string>\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"backups\": true,\n \"volume_size_gb\": 5000,\n \"ssh_keys\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"firewalls\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"networks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"user_data\": \"<string>\"\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://kennhosting.com/api/v1/vps/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"server_type\": \"<string>\",\n \"location\": \"<string>\",\n \"image\": \"<string>\",\n \"name\": \"<string>\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"backups\": true,\n \"volume_size_gb\": 5000,\n \"ssh_keys\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"firewalls\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"networks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"user_data\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://kennhosting.com/api/v1/vps/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 \"server_type\": \"<string>\",\n \"location\": \"<string>\",\n \"image\": \"<string>\",\n \"name\": \"<string>\",\n \"ipv4\": true,\n \"ipv6\": true,\n \"backups\": true,\n \"volume_size_gb\": 5000,\n \"ssh_keys\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"firewalls\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"networks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"user_data\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}