Script execution
The script execution capabilities of the API allow application developers to execut Platform scripts and includes the following REST calls:
createScript
|
Function |
Create a script. |
||
|
Description |
This request creates a new script with the given content and name at the platform server. In the script execution information it is mandatory to mention the trigger type and corresponding eventInfo or scheduleInfo depending upon the trigger type. Include the file in the request body or as file part. |
||
|
Type |
POST |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory)This operation requires parent asset to be in a Checked-Out state. |
|
|
|
long |
The scripting language |
|
|
|
string |
The set of attribute values. See "Request/Response parameter formats." |
|
|
Returns |
Returns an |
||
|
Examples |
URL:
Result:
|
||
getScriptContent
|
Function |
Get the content of a script. |
||
|
Description |
This request returns the content of the required script in text format. |
||
|
Type |
GET |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
This request requires no input parameters. |
||
|
Returns |
Returns the actual content of the required script in text format. |
||
|
Examples |
URL:
Result: The actual content of the required script in text format. |
||
getAllScripts
|
Function |
Get all scripts. |
||
|
Description |
This request returns all scripts stored at the platform server. |
||
|
Type |
GET |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
This request requires no input parameters. |
||
|
Returns |
Returns a |
||
|
Examples |
URL:
Result:
|
||
executeScript
|
Function |
Execute a script. |
||
|
Description |
This request executes a specified script that is already saved on the QPP Server. |
||
|
Type |
POST |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory) This operation executes the complete script. |
|
|
Returns |
The response depends upon the output of the script. |
||
|
Examples |
URL:
Result:
|
||
|
Function |
Execute a script method. |
||
|
Description |
This request executes a specified method of a specified script that is already saved on the QPP Server. |
||
|
Type |
POST |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory)This operation executes given the method of the script along with the given parameters. |
|
|
|
string |
Specify the method name to be executed. (Mandatory) |
|
|
|
long or string |
Specify the method's parameters if required. (Optional) |
|
|
Returns |
The response depends upon the output of the script. |
||
|
Examples |
URL:
Result: The response depends upon the output of the script. |
||
deleteScript
|
Function |
Delete a script. |
||
|
Description |
This request deletes the specified script. |
||
|
Type |
POST |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory) This request will lock the asset internally and delete it from system. |
|
|
Returns |
A status of 200 is returned in response to a successful request execution. |
||
|
Examples |
URL:
|
||
