Skip to main content
Version: 2024.1

Sandbox Commands

Description

Gets details for all the blueprint commands in the sandbox.

URL

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

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.

HTTP method

GET

Request

Headers

Example header format for the sandbox commands method:

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

Content-Type: application/json

Response

Response example

The sandbox commands method returns details about the blueprint commands in a particular sandbox and the actions that can be performed on each command.

[
{
"name":"my_command",
"description":"",
"params":[
{
"name":"param1",
"description":"",
"type":"numeric""possible values":[

],
"default value":"""mandatory":false
}
]"executions":[
{
"id":"0daead01-8e57-4064-81d4-84911effa911",
"status":"Pending",
"supports_Cancelation":"false",
"_links":{

}
}
],
"_links":{
"self":{
"href":"/sandboxes/0daead01-8e57-4064-81d4-84911effa000/commands/my-command",
"method":"GET"
},
"start":{
"href":"/sandboxes/0daead01-8e57-4064-81d4-84911effa000/commands/my-command/start",
"method":"POST"
}
}
}
[
Response summary

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

PropertySub PropertyDescription/Comments
name The name of the command. (string)
description A short description of the command. (string)
params The parameters needed for the command execution. (array)
 nameThe parameter name. (string)
 descriptionThe parameter description. (string)
 typeThe parameter type ("string", "numeric", or "lookup"). (string)
 possible valuesAll the possible values for this parameter. (array)
 default valueThe default value of the parameter. (string)
 mandatoryWhether or not the parameter is mandatory for the command execution. (bool)
executions The execution history for this command. (array)
 idThe ID of the execution. (string)
 statusThe current status of the command execution ("pending", "running", "stopping", "canceled", (string)
 supports_cancellationWhether or not stopping the execution before it is completed is supported. (bool)
 _linksThe actions that can be performed on the execution (Get execution details, Delete execution)
_links The actions that can be performed on a sandbox's blueprint command in the user's domain:
 selfProvides a link to get a command's details via a GET request.
 startProvides a link to get start a command's execution via a POST request.