Manage the runtime state of containers and inspect their transition history. Use these endpoints to start, stop, restart, pause, or resume a container, and to retrieve a paginated audit trail of every status change.
GET /api/v1/containers/{id}/status-logs
Returns a paginated list of status transition logs for a single container, ordered by transition time by default.
Name In Type Required Description idpath string Yes Container ID pagequery number No Page number. Default: 1 limitquery number No Number of results per page. Default: 10 sort_byquery string No Field to sort by. Default: "transition_time". Allowed: "transition_time", "created_at", "to_status", "from_status" sort_orderquery string No Sort direction. Default: "desc". Allowed: "asc", "desc"
"message" : " Container status logs retrieved successfully " ,
"id" : " 507f1f77bcf86cd799439077 " ,
"container_id" : " 507f1f77bcf86cd799439011 " ,
"from_status" : " stopped " ,
"transition_time" : " 2025-01-15T10:30:00.000Z " ,
"message" : " Invalid ID format "
Error Code Title Description Resolution INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f)
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access ACCOUNT_BANNEDAccount banned Your account has been banned and cannot access this resource Contact support for information about your account status
"message" : " Container not found "
Error Code Title Description Resolution CONTAINER_NOT_FOUNDContainer not found The requested container does not exist or you do not have permission to access it. Verify the container ID is correct and that you have access to the project it belongs to.
const { data } = await client . api . containers . getStatusLogs ( {
id: " 507f1f77bcf86cd799439011 " ,
sort_by: " transition_time " ,
POST /api/v1/containers/{id}/{operation}
Performs a lifecycle operation on a container. The {operation} path segment selects the action.
Note
Operations that conflict with the container’s current state return a 400 with code OPERATION_STATE_CONFLICT. For example, you cannot start a container that is already running, nor pause a container that is stopped.
Name In Type Required Description idpath string Yes Container ID operationpath string Yes Lifecycle operation to perform. Allowed: "start", "stop", "force-stop", "restart", "pause", "resume"
This endpoint accepts no request body.
"message" : " Container operation completed successfully " ,
"container_id" : " 507f1f77bcf86cd799439011 " ,
"project_id" : " 507f1f77bcf86cd799439033 " ,
"message" : " Container started successfully " ,
"message" : " Container is already running " ,
"container_id" : " 507f1f77bcf86cd799439011 " ,
"project_id" : " 507f1f77bcf86cd799439033 " ,
"message" : " Container is already running " ,
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f) OPERATION_STATE_CONFLICTContainer State Conflict The operation cannot be performed because the container is not in the correct state. Check the container’s current status. For example, a container must be stopped to be started.
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access ACCOUNT_BANNEDAccount banned Your account has been banned and cannot access this resource Contact support for information about your account status OPERATION_NOT_PERMITTED_ON_EXPIREDOperation Not Permitted on Expired Container This operation cannot be performed because the container has expired due to server termination. The container is in a read-only state. No further operations are allowed. Please create a new container.
"message" : " Container not found "
Error Code Title Description Resolution CONTAINER_NOT_FOUNDContainer not found The requested container does not exist or you do not have permission to access it. Verify the container ID is correct and that you have access to the project it belongs to.
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Error Code Title Description Resolution INTERNAL_SERVER_ERRORInternal server error An unexpected error occurred on the server Try again later, or contact support if the problem persists EXTERNAL_SERVICE_ERRORExternal service error A required external service is unavailable or returned an error Try again later when the external service is available
const { data } = await client . api . containers . manage ( {