Get Script Execution Status
Gets the status of the running or recently completed execution specified by the <executionId>.
The <executionId> is the execution identifier returned by the Start New Script Execution operation.
Request syntax
https://mycloud.perfectomobile.com/services/executions/<executionId>?operation=status&securityToken=value[&optionalParameter=value]
Parameters
Name | Default | Description |
---|---|---|
securityToken* |
|
A unique cryptographic key assigned to an authorized user. |
admin |
|
true to allow users with administrative credentials to get the status of an execution started by other automation users. |
responseFormat |
json |
The format to use for the response. Possible values: xml,json. |
* Mandatory
Response
Name | Description |
---|---|
reason |
The reason for the end code returned by flowEndCode. This can be used for diagnosing the cause of an execution failure. |
devices |
The information of the devices used in the script. Includes the id, manufacturer and model. |
description |
The description of the current execution status. |
completed |
true if the execution had completed. |
flowEndCode |
The completion code of the execution. The following is a list of the possible return values: Success
Failed
UserAborted
Unknown |
completionDescription |
The description of the execution completion status. |
failedValidations |
The count of failed validations. |
progressPercentage |
The progress percentage of the running execution. |
reportKey |
The identifier that you can use to download the execution report from the repository. The key is only valid once the script's execution completes and does not expire. For example, PRIVATE:reportName.xml. |
failedActions |
The count of failed actions. |
status |
The current status of the execution. The following is a list of the possible return values: Initializing - The execution is initializing and preparing to run the specified script Waiting for resources - The execution is awaiting resources required by the script Running - The execution is performing the functions coded in the script Terminating - The execution completed the last function in the script and is performing cleanup operations, e.g. finalizing the video, updating data structures, releasing resources. Completed - The execution has completed and is no longer running |
parent |
If the execution was invoked by another execution, this field contains the execution identifier of the parent execution. This field can be used to identify child executions, or to query the status of a parent execution. |
Example
This example shows the request and response for getting the status of the execution with the specified <executionId> without specifying any optional parameters.
Request
https://mycloud.perfectomobile.com/services/executions/samb@perfectomobile.com_simpleTest_16-11-08_12_17_17_1013?operation=status&securityToken=<your_token>
JSON response
{
"reason":"Success",
"devices":[{
"model":"I337 Galaxy S IV",
"id":"9A5F8BA0",
"manufacturer":"Samsung" }
],
"description":"Completed",
"completed":"true",
"flowEndCode":"Success",
"completionDescription":"Success",
"executionId":"samb@perfectomobile.com_simpleTest_16-11-08_12_17_17_1013",
"failedValidations":"0",
"progressPercentage":"100.0",
"reportKey":"PRIVATE:161108/simpleTest_16-11-08_12_17_17_1013.xml",
"failedActions":"0",
"user":"samb@perfectomobile.com",
"status":"Completed"}