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 1 Reference Guide

CloudShell Sandbox API Version 1 Reference Guide

In this article:

  • 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/v1/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/v1/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 method

    POST

    Request

    Response

    sandbox identifier

    Description

    Gets details and available actions for a particular sandbox.

    URL

    http://{CloudShell Sandbox API Gateway IP address}:{port#}/api/v1/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/v1/sandboxes

    HTTP method

    GET

    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/v1/sandboxes/{sandbox_identifier}/stop

    HTTP method

    POST

    Request

    Response