Skip to main content
Version: 2023.3

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.)

Notes
  • You cannot reserve blueprints if there are conflicts with the reservation timeslot. For additional information see Creating Sandboxes.
  • This method does not support persistent sandboxes. As such, starting a persistent sandbox will deploy a regular sandbox.

URL

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

ParameterDescription/Comments
blueprint_identifierThe name or id of the blueprint (string). Can be retrieved via blueprints.

HTTP method

POST

Request

Headers

Example header format for the blueprint start method:

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

Content-Type: application/json

Request body

The scheduling and input parameters of the sandbox in JSON format. The elements of the blueprint start method include:

ParameterDescription/Comments
nameThe name of the sandbox. (string)
If you do not specify a name, you will get the following error message: "Reservation name and duration must be specified in request body".
durationThe duration for this sandbox. Time must be specified in ISO 8601 format (for example PT23H). (string)
If you do not specify the duration, you will get the following error message: "Duration format must be a valid 'ISO 8601' (e.g 'PT23H' or 'PT4H2M')".
paramsAny published input parameters defined for the blueprint and its abstract resources. Input parameters that have no default must be included in the request. Abstract resource input parameters must be associated to global inputs (specify the global inputs in the request). (Array)
If you do not specify the input parameters, you will get the following error message: "Blueprint has invalid inputs".
permitted_usersUsers permitted to use the sandbox. Permitted users must have access to the logged-in domain.
Request example
{
"name":"testbp-sndbx",
"duration":"PT2H5M",
"params":[
{
"name":"global1",
"value":"value1"
},
{
"name":"abstract resource 1.attribute4",
"value":"some value"
},
{
"name":"abstract resource 1/sub resource.attribute4",
"value":"some value"
}
],
"permitted_users":[
"john.s",
"emily.b",
"lucas.w"
]
}

Response

Response example

The blueprint start method returns details about the new sandbox. The output includes details about the sandbox ID and the actions that can be performed on the sandbox:

{
"name":"Test Blprnt2",
"id":"994bd534-740a-45f5-851f-ff452f2a17a2",
"state":"Ready",
"type":"Sandbox",
"components":[
"name":"MySwitch",
"type":"Resource",
"component_type":"Generic Switch Model",
"description":"",
"attributes":[
{
"type":"string",
"name":"vendor",
"value":" """
}
],
"connection_interfaces":[
{
"name":"Telnet",
"url":""
}
],
}
],
"apps":[
{
"name":"MyApp",
"type":"Application",
"description":""
}
],
"_links":{
"self":{
"href":"/sandboxes/994bd534-740a-45f5-851f-ff452f2a17a2",
"method":"GET",
"name":"get a sandbox' details",
"templated":true
},
"stop":{
"href":"/sandboxes/994bd534-740a-45f5-851f-ff452f2a17a2/stop",
"method":"POST",
"name":"stop a sandbox",
"templated":true
},
"all":{
"href":"/sandboxes",
"method":"GET",
"name":"get all sandboxes"
}
}
Response summary

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

PropertySub PropertyDescription/Comments
name The name of the sandbox. (string)
id The ID of the sandbox. (string)
state The current state of the sandbox. Possible values: Pending, Setup, Ready, Teardown, Error, Ended. (string)
type The sandbox type ("Sandbox"). (string)
components The resource model of the sandbox. (array)
 nameThe name of the component. (string)
 typeThe component ("resource", "application", or "service"). (string)
 component_typeThe resource model. (string)
 descriptionA short description of the resource.
 attributesThe attributes of the resource model. (array)
 typeThe attribute type. (string)
 nameThe attribute name. (string)
 valueThe attribute value. (string)
 connection_interfacesThe connection interfaces of the resource. (array)
 nameThe name of the connection interface. (string)
 urlThe URL of the connection interface of the resource. (string)
apps The Apps of the sandbox. (string)
 typeThe App type ("Application"). (string)
 nameThe name of the App (for example, App1). (string)
 descriptionA short description of the App. (string)
_links The actions that can be performed on the sandbox in the user's domain:
 selfProvides a link to get the details for the sandbox via a GET request.
 stopProvides a link to get stop the sandbox via a POST request.
 allProvides a link to get all available sandboxes according to the user's domain via a GET request.