Legacy | Execute Command
Invokes a single automation command.
Available command operations:
Each command is identified uniquely by a command and subcommand pair.
For Example: to execute the Text checkpoint command, command=checkpoint and subcommand=text
The <executionId> is the execution identifier returned by the Start New Execution operation.
Request syntax
https://mycloud.perfectomobile.com/services/executions/<executionId>?operation=command&securityToken=value&command=value&subcommand=value[&optionalParameters=value]
Parameters
Name |
Type |
Default |
Description |
---|---|---|---|
securityToken* |
string |
|
A unique cryptographic key assigned to an authorized user. |
user |
string |
|
Deprecated. The name of the user running the operation. Note: This operation can only be run by Automation users. Note: All authentications require now a security token. For information on obtaining a security token, see Generate security tokens. |
password |
string |
|
Deprecated. The password for the user. Note: All authentications require now a security token. For information on obtaining a security token, see Generate security tokens. |
command* |
string |
|
The command. |
subcommand* |
string |
|
The subcommand. This parameter is mandatory for commands that have a subcommand. |
param. |
string |
|
The name and value of one or more parameters of the command, each prefixed with param. For example, to specify an integer parameter called timeout with the value 10, add param.timeout=10 to the URL. |
securedParam. |
string |
|
The name and value of one or more secured parameters of the command, each prefixed with securedParam. For example, to specify a string parameter called text with the value z5VwobV/vjZYZKt6Lu6IOQ, add securedParam.text=z5VwobV/vjZYZKt6Lu6IOQ to the URL. |
responseFormat |
string |
json |
The format to use for the response. Possible values: xml, json. |
* Mandatory
Parameter Types - Special Cases
Response
The command response contains basic details about the completion status and relevant timers. It may also include additional data that is specific for the command. For Example, the response to visual analysis commands includes the analysis grade and region.
The basic command response includes:
Name | Description |
---|---|
description | The description of the command execution status. |
flowEndCode | The completion code of the command. The following is a list of the possible return values: Success, Failed, UserAborted, Unknown. |
reason | The reason for the end code returned by flowEndCode. This can be used for diagnosing the cause of an command execution failure. |
completed | true if the command execution had completed. |
timer.elapsed | Elapsed time (no segmentation). |
timer.ux | User experience time. |
timer.device | Device work time. |
timer.system | System activity time. |
Example | Open device command
This example shows the request and response in json format for the Open device command.
Request
https://mycloud.perfectomobile.com/services/executions/samb@perfectomobile.com_controller_16-11-03_12_05_57_457?operation=command&securityToken=<your_token>&command=device&subcommand=open¶m.deviceId=6BA14A93C1DE5748D3E65C555CCE67FCC9EBD4CA
JSON response
{
"executionId" : "samb@perfectomobile.com_controller_16-11-03_12_05_57_457",
"reason" : "Success",
"timer.elapsed" : "5531",
"testGridReportUrl" : "https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=samb@perfectomobile.com_controller_16-11-03_12_05_57_457",
"timer.ux" : "0",
"singleTestReportUrl" : "https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161103/controller_16-11-03_12_05_57_457.xml&ownerId=samb@perfectomobile.com&sharingCode=0730b68d-6452-43bc-bb2a-39fcfccc6344",
"description" : "Success",
"timer.system" : "5531",
"reportKey" : "PRIVATE:controller/161103/controller_16-11-03_12_05_57_457.xml",
"completed" : "true",
"flowEndCode" : "SUCCEEDED",
"timer.device" : "0"}