CloudShell Version: 9.0 GA

Help Version: 1.0

CloudShell
TestShell
Api Guide
View / Download All Help Versions
API Guide
You are here: CloudShell Sandbox API > CloudShell Sandbox API Version 2 Reference Guide

CloudShell Sandbox API Version 2 Reference Guide

In this article:

loginsandboxexecution
loginblueprint startexecution id
 sandboxesexecution stop
blueprintsandbox identifier 
blueprintssandbox commands 
blueprint identifiersandbox command name 
 sandbox command start 
 sandbox components 
 sandbox component id 
 sandbox component commands 
 component command name 
 component command start 
 sandbox activity 
 sandbox extend 
 sandbox output 
 sandbox stop 

Note: To use the live documentation pages, log in to the Authentication API page using your user credentials and the name of the appropriate CloudShell domain. Then, access the Sandbox API page to execute its methods on the public blueprints and sandboxes in the domain.

login

Description

Logs the user in to CloudShell, authenticates the user’s credentials and domain, and returns an authorization token to be used with all subsequent requests. Requests that contain this token return information relevant for the specified domain, per the user's permissions.

URL

http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/login

HTTP method

PUT

Request

Response

blueprints

Description

Gets a list of all the public blueprints associated with the user's domain. Returns blueprint details related to the user's domain and permissions, such as the blueprint GUID and the actions that can be performed on each blueprint.

Note: In CloudShell Portal, make sure to set the blueprints to "Public" as the API does not work with private blueprints.

URL

http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/v2/blueprints

HTTP method

GET

Request

Response

blueprint identifier

Description

Gets details and available actions for a particular public blueprint associated with the user's domain.

Note: You can get the blueprint name and blueprint ID from the blueprints method or from the blueprint ID segment in the CloudShell Portal URL).

URL

http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/v2/blueprints/{blueprint_identifier}

HTTP method

GET

Request

Response

blueprint start

Description

Creates a new sandbox from a specific public blueprint associated with the user's domain. Returns details about the sandbox such as ID and the actions that can be performed on the sandbox. (After the sandbox is created, you can view it in the Sandboxes dashboard in CloudShell Portal.)

Note: You cannot reserve blueprints if there are conflicts with the reservation timeslot. For additional information see the Creating Sandboxes article in the CloudShell Portal online help.

URL

http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/v2/blueprints/{blueprint_identifier}/start

HTTP method

POST

Request

Response

sandbox identifier

Description

Gets details and available actions for a particular sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL.

URL

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

HTTP method

GET

Request

Response

sandboxes

Description

Gets a list of all the running and pending sandboxes associated with the user's domain, as well as each sandbox's details, including the sandbox ID and the available actions that can be performed on it. It can also show completed sandboxes related to the user's domain.

URL

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

HTTP method

GET

Request

Response

sandbox components

Description

Gets details about the components (resources, services, and Apps) of a particular sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL.

URL

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

HTTP method

GET

Request

Response

sandbox component id

Description

Gets details and available actions for a particular component (resource, service, or App) in a specific sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL, and the component ID from the sandbox components method and the blueprint start method.

URL

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

HTTP method

GET

Request

Response

sandbox component commands

Description

Gets details about all the commands provided for a particular component (resource, service, or App) in a specific sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL, and the component ID from the sandbox components method and the blueprint start method.

URL

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

HTTP method

GET

Request

Response

component command name

Description

Gets details about a particular command for a specific component (resource, service, or App) in a sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL, the component ID from the sandbox components method and the blueprint start method, and the command's name from the sandbox component commands method.

URL

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

HTTP method

GET

Request

Response

component command start

Description

Executes a particular command for a specific component (resource, service, or App) in a sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL, the component ID from the sandbox components method and the blueprint start method, and the command's name from the sandbox component commands method.

URL

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

HTTP method

POST

Request

Response

sandbox activity

Description

Gets the content of CloudShell Portal's Activity Feed for a particular sandbox. This displays information about actions performed in the sandbox by the user and automation process.

The maximum number of entries in the response is configured by the administrator. If this number of entries is exceeded, the response will include multiple pages. For more information, see Setting the response page size.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL.

URL

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

HTTP method

GET

Request

Response

sandbox output

Description

Gets the content of CloudShell Portal's Output console for a particular sandbox. This displays execution information related to running blueprint and resource commands.

The maximum number of entries in the response is configured by the administrator. If this number of entries is exceeded, the response will include multiple pages. For more information, see Setting the response page size.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL.

URL

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

HTTP method

GET

Request

Response

sandbox extend

Description

Extends the duration of a particular sandbox by a specified timeframe.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL.

URL

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

HTTP method

POST

Request

Response

sandbox stop

Description

Ends a sandbox per specified sandbox ID. Returns a successful response when the sandbox is stopped.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL.

URL

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

HTTP method

POST

Request

Response

sandbox commands

Description

Gets details for all the blueprint commands in the sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL.

URL

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

HTTP method

GET

Request

Response

sandbox command name

Description

Gets details about a particular blueprint command in a specific sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL, and the command's name from the sandbox commands method.

URL

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

HTTP method

GET

Request

Response

sandbox command start

Description

Executes a particular command for a specific sandbox.

Note: You can get the sandbox ID from the sandboxes method, blueprint start method, and from the sandbox ID segment in the CloudShell Portal URL, and the command's name from the sandbox commands method.

URL

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

HTTP method

POST

Request

Response

execution id

Description

Gets details about a specific execution of a sandbox or component command, per specified execution ID.

Note: You can get the execution ID from the component command start and the blueprint start methods.

URL

http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/v2/executions/{execution_id}

HTTP method

GET

Request

Response

execution stop

Description

Ends an execution of a component or sandbox command, per specified execution ID. Returns a successful response when the execution is stopped.

Note: You can get the execution ID from the component command start and the blueprint start methods.

URL

http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/v2/executions/{execution_id}

HTTP method

DELETE

Request

Response