List CVMs
curl --request GET \
--url https://cloud-api.phala.com/api/v1/cvms \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud-api.phala.com/api/v1/cvms"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud-api.phala.com/api/v1/cvms', 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://cloud-api.phala.com/api/v1/cvms",
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://cloud-api.phala.com/api/v1/cvms"
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://cloud-api.phala.com/api/v1/cvms")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.phala.com/api/v1/cvms")
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[
{
"hosted": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"uptime": "<string>",
"app_id": "<string>",
"app_url": "<string>",
"instance_id": "<string>",
"configuration": {
"name": "<string>",
"image": "<string>",
"vcpu": 123,
"memory": 123,
"disk_size": 123,
"compose_file": {
"name": "<string>",
"allowed_envs": [
"<string>"
],
"bash_script": "<string>",
"default_gateway_domain": "<string>",
"docker_compose_file": "<string>",
"init_script": "<string>",
"kms_enabled": true,
"local_key_provider_enabled": false,
"manifest_version": 2,
"no_instance_id": false,
"pre_launch_script": "<string>",
"public_logs": true,
"public_sysinfo": true,
"public_tcbinfo": true,
"runner": "docker-compose",
"gateway_enabled": true,
"features": [
"kms",
"tproxy-net"
],
"salt": "<string>",
"secure_time": false,
"storage_fs": "zfs",
"tproxy_enabled": true
},
"ports": [
{
"protocol": "<string>",
"host_port": 123,
"vm_port": 123,
"host_address": "<string>"
}
],
"encrypted_env": "<string>",
"app_id": "<string>",
"user_config": "<string>",
"hugepages": false,
"pin_numa": false,
"gpus": {
"gpus": [],
"attach_mode": "listed"
},
"kms_urls": [],
"gateway_urls": []
},
"exited_at": "<string>",
"boot_progress": "<string>",
"boot_error": "<string>",
"shutdown_progress": "<string>",
"image_version": "<string>",
"events": [
{
"event": "<string>",
"body": "<string>",
"timestamp": 0
}
]
},
"name": "<string>",
"status": "<string>",
"public_urls": [
{
"app": "<string>",
"instance": "<string>"
}
],
"managed_user": {
"id": 123,
"username": "<string>"
},
"node": {
"id": 123,
"name": "<string>",
"region_identifier": "<string>"
},
"listed": false,
"in_progress": false,
"dapp_dashboard_url": "<string>",
"syslog_endpoint": "<string>",
"allow_upgrade": false,
"project_id": "prj_0123abcd",
"project_type": "<string>",
"billing_period": "<string>",
"kms_info": {
"id": "<string>",
"url": "<string>",
"version": "<string>",
"slug": "<string>",
"chain_id": 123,
"kms_contract_address": "<string>",
"gateway_app_id": "<string>"
},
"contract_address": "<string>",
"deployer_address": "<string>",
"vcpu": 123,
"memory": 123,
"disk_size": 123,
"gateway_domain": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}CVMs
List CVMs
Returns CVMs in current workspace. Admins can filter by user_id or teepod_id.
GET
/
api
/
v1
/
cvms
List CVMs
curl --request GET \
--url https://cloud-api.phala.com/api/v1/cvms \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud-api.phala.com/api/v1/cvms"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud-api.phala.com/api/v1/cvms', 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://cloud-api.phala.com/api/v1/cvms",
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://cloud-api.phala.com/api/v1/cvms"
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://cloud-api.phala.com/api/v1/cvms")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.phala.com/api/v1/cvms")
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[
{
"hosted": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"uptime": "<string>",
"app_id": "<string>",
"app_url": "<string>",
"instance_id": "<string>",
"configuration": {
"name": "<string>",
"image": "<string>",
"vcpu": 123,
"memory": 123,
"disk_size": 123,
"compose_file": {
"name": "<string>",
"allowed_envs": [
"<string>"
],
"bash_script": "<string>",
"default_gateway_domain": "<string>",
"docker_compose_file": "<string>",
"init_script": "<string>",
"kms_enabled": true,
"local_key_provider_enabled": false,
"manifest_version": 2,
"no_instance_id": false,
"pre_launch_script": "<string>",
"public_logs": true,
"public_sysinfo": true,
"public_tcbinfo": true,
"runner": "docker-compose",
"gateway_enabled": true,
"features": [
"kms",
"tproxy-net"
],
"salt": "<string>",
"secure_time": false,
"storage_fs": "zfs",
"tproxy_enabled": true
},
"ports": [
{
"protocol": "<string>",
"host_port": 123,
"vm_port": 123,
"host_address": "<string>"
}
],
"encrypted_env": "<string>",
"app_id": "<string>",
"user_config": "<string>",
"hugepages": false,
"pin_numa": false,
"gpus": {
"gpus": [],
"attach_mode": "listed"
},
"kms_urls": [],
"gateway_urls": []
},
"exited_at": "<string>",
"boot_progress": "<string>",
"boot_error": "<string>",
"shutdown_progress": "<string>",
"image_version": "<string>",
"events": [
{
"event": "<string>",
"body": "<string>",
"timestamp": 0
}
]
},
"name": "<string>",
"status": "<string>",
"public_urls": [
{
"app": "<string>",
"instance": "<string>"
}
],
"managed_user": {
"id": 123,
"username": "<string>"
},
"node": {
"id": 123,
"name": "<string>",
"region_identifier": "<string>"
},
"listed": false,
"in_progress": false,
"dapp_dashboard_url": "<string>",
"syslog_endpoint": "<string>",
"allow_upgrade": false,
"project_id": "prj_0123abcd",
"project_type": "<string>",
"billing_period": "<string>",
"kms_info": {
"id": "<string>",
"url": "<string>",
"version": "<string>",
"slug": "<string>",
"chain_id": 123,
"kms_contract_address": "<string>",
"gateway_app_id": "<string>"
},
"contract_address": "<string>",
"deployer_address": "<string>",
"vcpu": 123,
"memory": 123,
"disk_size": 123,
"gateway_domain": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
OAuth2AuthorizationCodeBearerAPIKeyHeader
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Filter by owner (admin only). Use '0' for unassigned.
Allowed value:
"0"Filter by node ID (admin only)
Response
List of CVM summaries
- HostedCvm · object[]
- CVMInfo · object[]
Mapping from Teepod RPC's VmInfo.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A hashed identifier that maps to an internal database ID
Pattern:
^prj_.+Example:
"prj_0123abcd"
KMS instance information.
Show child attributes
Show child attributes
Was this page helpful?
⌘I

