Skip to content

Beta: these docs are still being updated. The next full update is on 18 November at 8 PM UTC. Docs in beta. Full update 18 Nov, 8 PM UTC.

Hoody.com

The Computer Operations and Lifecycle endpoints control a computer’s runtime state and expose its status transition history. Use these endpoints to start, stop, force-stop, restart, pause, or resume a computer, or to retrieve paginated status logs.

In the Hub, open Computers, select a computer and use its action menu to Start, Stop, Restart or Resume it.

Returns a paginated list of status transition logs for a specific computer. Each entry records the previous and new status, the actor that triggered the transition, the duration of the status change in milliseconds, and any metadata captured at the moment of the transition. For a lifecycle operation, duration_ms records how long the operation ran. The duration is null when it was not measured.

NameInTypeRequiredDescription
idpathstringYesComputer ID
pagequerynumberNoPage number. Default: 1
limitquerynumberNoItems per page. Default: 10
sort_byquerystringNoField to sort by. Default: "transition_time". One of: "transition_time", "created_at", "to_status", "from_status"
sort_orderquerystringNoSort direction. Default: "desc". One of: "asc", "desc"

This endpoint takes no request body.

Terminal window
curl -X GET 'https://api.hoody.com/api/v1/computers/{id}/status-logs?page=1&limit=10&sort_by=transition_time&sort_order=desc' \
-H 'Authorization: Bearer <token>'

The status logs were retrieved successfully.

Media type: application/json

{
"statusCode": 200,
"message": "Status logs retrieved successfully",
"data": {
"logs": [
{
"id": "507f1f77bcf86cd799439077",
"computer_id": "507f1f77bcf86cd799439011",
"from_status": "stopped",
"to_status": "running",
"transition_time": "2025-01-15T10:30:00.000Z",
"duration_ms": 3500,
"triggered_by": "manual_operation",
"metadata": {
"kind": "computer_operation",
"operation": "start",
"actor_user_id": "507f1f77bcf86cd799439022"
}
},
{
"id": "507f1f77bcf86cd799439078",
"computer_id": "507f1f77bcf86cd799439011",
"from_status": "running",
"to_status": "stopped",
"transition_time": "2025-01-15T09:15:00.000Z",
"duration_ms": 90000,
"triggered_by": "manual_operation",
"metadata": {
"kind": "computer_operation",
"operation": "stop",
"actor_user_id": "507f1f77bcf86cd799439022"
}
}
],
"pagination": {
"total": 15,
"page": 1,
"limit": 10,
"totalPages": 2
}
}
}

Performs a lifecycle operation on a computer. The operation path segment selects the action: start, stop, force-stop, restart, pause, or resume. Each successful operation returns the computer’s new status and a message describing the outcome.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the computer to manage
operationpathstringYesLifecycle operation to perform. One of: start, stop, force-stop, restart, pause, resume

The body is optional. When present, it may carry the following field:

NameTypeRequiredDescription
timeoutintegerNoFor stop and restart, the time in seconds given for a clean shutdown. After this deadline, the computer is stopped forcibly and, for restart, started again, so the operation may run up to 420 seconds longer. For other operations, an upper bound in seconds on how long the operation may run before it is cut off. The minimum is 1 and the maximum is 600. If omitted, stop and restart use a 60-second clean-shutdown deadline, while other operations have no cut-off.
{
"timeout": 120
}
Terminal window
curl -X POST 'https://api.hoody.com/api/v1/computers/{id}/start' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"timeout": 120}'

The SDK exposes this operation through five named methods:

  • client.api.computers.start(id, data) sets operation to start.
  • client.api.computers.restart(id, data) sets operation to restart.
  • client.api.computers.pause(id, data) sets operation to pause.
  • client.api.computers.resume(id, data) sets operation to resume.
  • client.api.computers.stop(id, data, options?) sets operation to force-stop when options.force is truthy, otherwise sets operation to stop.

The caller does not pass the operation path value directly because each SDK method sets it.

The computer operation completed successfully.

Media type: application/json

{
"statusCode": 200,
"message": "Computer started.",
"data": {
"error": false,
"operation": "start",
"computer_id": "507f1f77bcf86cd799439011",
"project_id": "507f1f77bcf86cd799439033",
"message": "Computer started.",
"status": "running",
"operation_id": "9f86d081884c7d659a2feaa0c55ad015"
}
}