Skip to main content
Version: 2023.3

Component Command Start

Description

Executes a particular command or connected 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

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.
component_idThe id of the component (string). Can be retrieved via sandbox components and blueprint start.
command_nameThe name of the command (string). Can be retrieved via sandbox component commands.

HTTP method

POST

Request

Headers

Example header format for the component command start method:

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

Content-Type: application/json

Request body

The input parameters of the command in JSON format. The elements of the component command start method include.

ParameterDescription/Comments
command_tagTag defined for the connected command. Connected command tags are used to define categories of functionality.(string)
Possible values:
- power
- remote_<command name>: For example, "remote_save_snapshot" for vCenter VM save snapshot.
paramsAny input parameters required for running the command must be included in the request.(array)
If you do not specify the input parameters, you will get the following error message: "No values were provided for the following mandatory inputs: {Parameter name}".
connected_ports_full_pathList of connected ports to use in this operation. (array)
Include the full path from the root resource to each port, separated by slashes. For example: Switch20/Blade5/PowerPort1. Leave blank to perform the connected operation on all of the specified resource’s connected ports.
printOutputWhether or not the command output is displayed in the console or command line. (bool)
Request example for regular commands
{
"params":[
{
"name":"Version",
"value":"1.0.223.7"
}
],
"printOutput":"true/false"
}
Request example for connected commands
{
"command_tag": "power",
"params": [
{
"name": "Version",
"value": "1.0.223.7"
}
],
"connected_ports_full_path": [
"Switch20/Blade5/PowerPort1"
],
"printOutput": true
}

Response

Response example

The component command start method returns details about a specific execution of the sandbox component command. The response includes the command's execution ID and the actions that can be performed on the execution.

{
"executionId":"1DEB29BF-22B0-4CF6-B7BE-02173520EB81",
"supports_cancellation":true"_links":{
"self":{
"href":"/execution/1DEB29BF-22B0-4CF6-B7BE-02173520EB81",
"method":"GET"
},
"stop":{
"href":"/executions/1DEB29BF-22B0-4CF6-B7BE-02173520EB81",
"method":"DELETE"
}
}
}
Response summary

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

PropertySub PropertyDescription/Comments
executionId The ID of the execution. (string)
supports_cancellation Whether or not stopping the execution before it is completed is supported. (bool)
_links The actions that can be performed on the execution:
 selfProvides a link to get a the execution's details via a GET request.
 stopProvides a link to end the execution via a DELETE request.