API Guide

This help is for an older version of CloudShell. To see the latest, click here.

You are here: CloudShell API Guide > 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 

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.

Note: Sandbox API can be configured to run in secure mode. See Configuring Sandbox API to Run in HTTPS Mode.

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.

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 CloudShell Portal's Creating Sandboxes article.

URL

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

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

HTTP method

POST

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 identifier

Description

Gets details and available actions for a particular sandbox.

URL

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

HTTP method

GET

Request

Response

sandbox components

Description

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

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.

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.

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.

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.

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.

URL

http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/v2/sandboxes/{sandbox_identifier}/activity?tail=100&from_event_id

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.

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.

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.

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.

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.

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.

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

execution id

Description

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

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.

URL

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

HTTP method

DELETE

Request

Response