curl -X GET "http://CONTROL_PLANE_IP:PORT/task_status/uuid-string"
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "running",
"start_time": 1234567890.123,
"duration": 5.333
}
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "completed",
"start_time": 1234567890.123,
"end_time": 1234567895.456,
"total_duration": 5.333,
"result": {
"status": "success",
"message": "Desktop environment created successfully",
"vm_id": "vm-abc123",
"vnc_url": "https://...",
"vnc_port": 8000
}
}
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "failed",
"start_time": 1234567890.123,
"end_time": 1234567892.456,
"total_duration": 2.333,
"error": "Failed to create VM: resource limit exceeded"
}
Control Plane
Task Status
Check the status of a background task
GET
/
task_status
/
{task_id}
curl -X GET "http://CONTROL_PLANE_IP:PORT/task_status/uuid-string"
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "running",
"start_time": 1234567890.123,
"duration": 5.333
}
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "completed",
"start_time": 1234567890.123,
"end_time": 1234567895.456,
"total_duration": 5.333,
"result": {
"status": "success",
"message": "Desktop environment created successfully",
"vm_id": "vm-abc123",
"vnc_url": "https://...",
"vnc_port": 8000
}
}
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "failed",
"start_time": 1234567890.123,
"end_time": 1234567892.456,
"total_duration": 2.333,
"error": "Failed to create VM: resource limit exceeded"
}
Retrieves the current status and results of a background task started by endpoints like
/create_desktop or /reset.
Path Parameters
string
required
Task identifier returned by the original request
Response
string
Task identifier
string
Type of task (
create_desktop, reset_environment)string
Current status (
running, completed, failed)number
Unix timestamp when task started
number
Elapsed time in seconds (if running)
number
Unix timestamp when task ended (if completed/failed)
number
Total execution time in seconds (if completed/failed)
object
Task result (if completed)
string
Error message (if failed)
curl -X GET "http://CONTROL_PLANE_IP:PORT/task_status/uuid-string"
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "running",
"start_time": 1234567890.123,
"duration": 5.333
}
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "completed",
"start_time": 1234567890.123,
"end_time": 1234567895.456,
"total_duration": 5.333,
"result": {
"status": "success",
"message": "Desktop environment created successfully",
"vm_id": "vm-abc123",
"vnc_url": "https://...",
"vnc_port": 8000
}
}
{
"task_id": "uuid-string",
"task_type": "create_desktop",
"status": "failed",
"start_time": 1234567890.123,
"end_time": 1234567892.456,
"total_duration": 2.333,
"error": "Failed to create VM: resource limit exceeded"
}