List CVM operations
curl --request GET \
--url https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/operationsimport requests
url = "https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/operations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/operations', 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/{cvm_id}/operations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/{cvm_id}/operations"
req, _ := http.NewRequest("GET", url, nil)
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/{cvm_id}/operations")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/operations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"correlation_id": "<string>",
"operation_type": "<string>",
"target_state": "<string>",
"triggered_by": 123,
"started_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"sub_operations": [
"<string>"
],
"events": [
{
"event_type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"state": "<string>"
}
],
"instance_name": "<string>",
"triggered_by_username": "<string>",
"triggered_by_email": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"error_message": "<string>",
"compose_hash": "<string>"
}
],
"total": 123,
"next_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}CVMs
List CVM operations
Returns operation records grouped by correlation_id. Only includes events with correlation_id (new format since 2024-01). Error messages are sanitized for non-admin users.
GET
/
api
/
v1
/
cvms
/
{cvm_id}
/
operations
List CVM operations
curl --request GET \
--url https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/operationsimport requests
url = "https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/operations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/operations', 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/{cvm_id}/operations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/{cvm_id}/operations"
req, _ := http.NewRequest("GET", url, nil)
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/{cvm_id}/operations")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/operations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"correlation_id": "<string>",
"operation_type": "<string>",
"target_state": "<string>",
"triggered_by": 123,
"started_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"sub_operations": [
"<string>"
],
"events": [
{
"event_type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"state": "<string>"
}
],
"instance_name": "<string>",
"triggered_by_username": "<string>",
"triggered_by_email": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"error_message": "<string>",
"compose_hash": "<string>"
}
],
"total": 123,
"next_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Path Parameters
Query Parameters
Opaque cursor from previous response
Page size
Required range:
1 <= x <= 500Include operations started after this UTC time
Include operations started before this UTC time
Filter by operation types (e.g. compose_update, power_on)
Response
Paginated operation records
Was this page helpful?

