Skip to main content
Version: 2024.1

Sandbox Command Start

Description

Executes a particular command for a specific sandbox.

URL

http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/v2/sandboxes/{sandbox_identifier}/commands/{command_name}/start

ParameterDescription/Comments
sandbox_identifierThe id of the sandbox (string). Can be retrieved via sandboxes, blueprint start and from the sandbox ID segment in the CloudShell Portal URL.
command_nameThe name of the command (string). Can be retrieved via sandbox commands.

HTTP method

POST

Request

Headers

Example header format for the sandbox command start method:

Authorization: Basic <authorization token returned from the login method>

Content-Type: application/json

Request body

The input parameters of the command in JSON format. The elements of the sandbox command start method include.

ParameterDescription/Comments
paramsAny input parameters required for running the command must be included in the request. If you do not specify the input parameters, you will get the following error message: "No values were provided for the following mandatory inputs: {Parameter name}". (Array)
printOutputWhether or not the command output is displayed in the console or command line. (bool)
Request example
{
"params":[
{
"name":"string",
"value":"string"
}
]
}

Response

Response example

The sandbox command start method returns details about a specific execution of the sandbox command. The response includes the command's execution ID and the actions that can be performed on the execution.

{
"executionId":"1DEB29BF-22B0-4CF6-B7BE-02173520EB81",
"supports_cancellation":true"_links":{
"self":{
"href":"/execution/1DEB29BF-22B0-4CF6-B7BE-02173520EB81",
"method":"GET"
},
"stop":{
"href":"/executions/1DEB29BF-22B0-4CF6-B7BE-02173520EB81",
"method":"DELETE"
}
}
}
Response summary

The response output properties of the sandbox command start method are described in the following table.

PropertySub PropertyDescription/Comments
executionId The ID of the execution. (string)
supports_cancellation Whether or not stopping the execution before it is completed is supported. (bool)
_links The actions that can be performed on the execution:
 selfProvides a link to get the execution's details via a GET request.
 stopProvides a link to end the execution via a DELETE request.