List services
curl --request GET \
--url https://api.vmarea.com/api/public/v1/services \
--header 'x-api-key: <api-key>'import requests
url = "https://api.vmarea.com/api/public/v1/services"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.vmarea.com/api/public/v1/services', 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.vmarea.com/api/public/v1/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vmarea.com/api/public/v1/services"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vmarea.com/api/public/v1/services")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vmarea.com/api/public/v1/services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "<string>",
"type": "VM",
"displayName": "<string>",
"status": "PENDING",
"statusChangedAt": "2023-11-07T05:31:56Z",
"productId": "<string>",
"planId": "<string>",
"locationId": "<string>",
"capabilities": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"activatedAt": "2023-11-07T05:31:56Z",
"terminatedAt": "2023-11-07T05:31:56Z",
"billing": {
"status": "<string>",
"priceMonthly": "<string>",
"currency": "<string>",
"cycleDays": 123,
"nextRenewalAt": "2023-11-07T05:31:56Z"
},
"vm": {
"hostname": "<string>",
"status": "<string>",
"ip": "<string>"
},
"lifecycle": {
"state": "ACTIVE",
"reason": "<string>",
"nextStep": "POWER_OFF",
"nextStepAt": "2023-11-07T05:31:56Z",
"suspendAt": "2023-11-07T05:31:56Z",
"finalWarningAt": "2023-11-07T05:31:56Z",
"deleteAt": "2023-11-07T05:31:56Z",
"restorableUntil": "2023-11-07T05:31:56Z",
"paused": true,
"paidUntil": "2023-11-07T05:31:56Z",
"restorableDays": 123,
"restorable": true
}
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123
}
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}Services
List services
Paginated list of customer-visible services owned by the authenticated token’s user, optionally filtered by type and status. Requires the vms:read scope.
GET
/
api
/
public
/
v1
/
services
List services
curl --request GET \
--url https://api.vmarea.com/api/public/v1/services \
--header 'x-api-key: <api-key>'import requests
url = "https://api.vmarea.com/api/public/v1/services"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.vmarea.com/api/public/v1/services', 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.vmarea.com/api/public/v1/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vmarea.com/api/public/v1/services"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vmarea.com/api/public/v1/services")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vmarea.com/api/public/v1/services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "<string>",
"type": "VM",
"displayName": "<string>",
"status": "PENDING",
"statusChangedAt": "2023-11-07T05:31:56Z",
"productId": "<string>",
"planId": "<string>",
"locationId": "<string>",
"capabilities": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"activatedAt": "2023-11-07T05:31:56Z",
"terminatedAt": "2023-11-07T05:31:56Z",
"billing": {
"status": "<string>",
"priceMonthly": "<string>",
"currency": "<string>",
"cycleDays": 123,
"nextRenewalAt": "2023-11-07T05:31:56Z"
},
"vm": {
"hostname": "<string>",
"status": "<string>",
"ip": "<string>"
},
"lifecycle": {
"state": "ACTIVE",
"reason": "<string>",
"nextStep": "POWER_OFF",
"nextStepAt": "2023-11-07T05:31:56Z",
"suspendAt": "2023-11-07T05:31:56Z",
"finalWarningAt": "2023-11-07T05:31:56Z",
"deleteAt": "2023-11-07T05:31:56Z",
"restorableUntil": "2023-11-07T05:31:56Z",
"paused": true,
"paidUntil": "2023-11-07T05:31:56Z",
"restorableDays": 123,
"restorable": true
}
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123
}
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}Authorizations
Long-lived API token (early access; contact hello@vmarea.com). Tokens are scope-restricted; this spec lists the scope each endpoint requires.
Query Parameters
Required range:
x >= 1Required range:
1 <= x <= 100Available options:
VM, DEDICATED, HOSTING, STORAGE_BOX, OBJECT_STORAGE Available options:
PENDING, PROVISIONING, ACTIVE, SUSPENDED, COOLDOWN, TERMINATED, ERROR