List Virtual Machines
curl --request GET \
--url https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines', 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.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"apiVersion": "compute.mountthor.com/v1alpha1",
"items": [
{
"apiVersion": "compute.mountthor.com/v1alpha1",
"kind": "VirtualMachine",
"metadata": {
"name": "<string>",
"annotations": {},
"creationTimestamp": "2023-11-07T05:31:56Z",
"deletionTimestamp": "2023-11-07T05:31:56Z",
"generation": 1,
"labels": {},
"namespace": "<string>",
"resourceVersion": "<string>",
"uid": "<string>"
},
"spec": {
"imageRef": "<string>",
"bootstrap": {
"sshAuthorizedKeys": [
{
"publicKey": "<string>",
"username": "<string>"
}
]
},
"ports": [
{
"guestPort": 32768,
"name": "<string>",
"exposure": "private-tunnel",
"protocol": "<string>",
"readinessProbe": true
}
],
"resources": {
"cpu": 123,
"diskGiB": 123,
"memoryGiB": 123
}
},
"status": {
"capacitySource": "<string>",
"failureCode": "InvalidSpec",
"failureMessage": "<string>",
"observedGeneration": 123,
"phase": "Pending",
"publishedPorts": [
{
"accessCommand": "<string>",
"exposure": "<string>",
"guestPort": 123,
"name": "<string>",
"protocol": "<string>",
"uriTemplate": "<string>"
}
],
"readyForAccess": true,
"resolvedImageRef": "<string>",
"sshHostKeys": [
{
"algorithm": "<string>",
"publicKey": "<string>"
}
]
}
}
],
"kind": "VirtualMachineList",
"metadata": {
"continue": "<string>",
"remainingItemCount": 1,
"resourceVersion": "<string>"
}
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}Virtual Machines
List Virtual Machines
Lists Virtual Machines in the tenant namespace.
GET
/
v1
/
compute
/
apis
/
compute.mountthor.com
/
v1alpha1
/
namespaces
/
{namespace}
/
virtualmachines
List Virtual Machines
curl --request GET \
--url https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines', 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.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"apiVersion": "compute.mountthor.com/v1alpha1",
"items": [
{
"apiVersion": "compute.mountthor.com/v1alpha1",
"kind": "VirtualMachine",
"metadata": {
"name": "<string>",
"annotations": {},
"creationTimestamp": "2023-11-07T05:31:56Z",
"deletionTimestamp": "2023-11-07T05:31:56Z",
"generation": 1,
"labels": {},
"namespace": "<string>",
"resourceVersion": "<string>",
"uid": "<string>"
},
"spec": {
"imageRef": "<string>",
"bootstrap": {
"sshAuthorizedKeys": [
{
"publicKey": "<string>",
"username": "<string>"
}
]
},
"ports": [
{
"guestPort": 32768,
"name": "<string>",
"exposure": "private-tunnel",
"protocol": "<string>",
"readinessProbe": true
}
],
"resources": {
"cpu": 123,
"diskGiB": 123,
"memoryGiB": 123
}
},
"status": {
"capacitySource": "<string>",
"failureCode": "InvalidSpec",
"failureMessage": "<string>",
"observedGeneration": 123,
"phase": "Pending",
"publishedPorts": [
{
"accessCommand": "<string>",
"exposure": "<string>",
"guestPort": 123,
"name": "<string>",
"protocol": "<string>",
"uriTemplate": "<string>"
}
],
"readyForAccess": true,
"resolvedImageRef": "<string>",
"sshHostKeys": [
{
"algorithm": "<string>",
"publicKey": "<string>"
}
]
}
}
],
"kind": "VirtualMachineList",
"metadata": {
"continue": "<string>",
"remainingItemCount": 1,
"resourceVersion": "<string>"
}
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}{
"apiVersion": "v1",
"kind": "Status",
"status": "Success",
"code": 349,
"message": "<string>",
"reason": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Tenant namespace returned by Get Account.
Response
Resources listed