Get Virtual Machine
curl --request GET \
--url https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines/{name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines/{name}"
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/{name}', 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/{name}",
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/{name}"
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/{name}")
.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/{name}")
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",
"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>"
}
]
}
}{
"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
Get Virtual Machine
Returns one Virtual Machine by name from the tenant namespace.
GET
/
v1
/
compute
/
apis
/
compute.mountthor.com
/
v1alpha1
/
namespaces
/
{namespace}
/
virtualmachines
/
{name}
Get Virtual Machine
curl --request GET \
--url https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines/{name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mountthor.com/v1/compute/apis/compute.mountthor.com/v1alpha1/namespaces/{namespace}/virtualmachines/{name}"
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/{name}', 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/{name}",
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/{name}"
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/{name}")
.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/{name}")
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",
"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>"
}
]
}
}{
"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.
Kubernetes object name for the VirtualMachine.
Response
Resource returned
Customer-visible VirtualMachine resource in the Mount Thor Compute API.
Kubernetes API version. Must be compute.mountthor.com/v1alpha1.
Available options:
compute.mountthor.com/v1alpha1 Kubernetes resource kind. Must be VirtualMachine.
Available options:
VirtualMachine Customer-safe metadata for the VirtualMachine.
Show child attributes
Show child attributes
VirtualMachine spec is immutable. Delete and recreate the resource to change it.
Show child attributes
Show child attributes
VirtualMachineStatus defines the observed state of a VirtualMachine.
Show child attributes
Show child attributes