Web API for Scripts: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Scripts API is used to | Scripts API is used to start and stop script runs and get the current or last completed script run log. | ||
==Methods== | ==Methods== | ||
Line 9: | Line 9: | ||
</pre> | </pre> | ||
Starts | Starts to run script with given id. Returns id of the started script run operation. Returns immediately without waiting for a script run to be finished. Returns 0 if the script is already running. Requires the global RunScript permission. Returns NotFound if a script does not exist, or Forbidden if current user has no access to the script. | ||
=== End script run === | === End script run === | ||
Line 16: | Line 16: | ||
</pre> | </pre> | ||
Terminates | Terminates run of script with given id. Returns id of the terminated script run operation. Returns immediately without waiting for a script run to be aborted. Returns 0 if the script is not running. Requires the global RunScript permission. Returns NotFound if a script does not exist, or Forbidden if current user has no access to the script. | ||
=== Get current run log === | === Get current run log === | ||
Line 23: | Line 23: | ||
</pre> | </pre> | ||
Gets the current run log | Gets the current run log for script with given id, i.e. a run that is currently in progress. Returns the object with the following fields: Log, Exceptions, AdditionalData, OperationId. Returns null if the script is not running. Requires the global RunScript permission. Returns NotFound if a script does not exist, or Forbidden if current user has no access to the script. | ||
=== Get last run log === | === Get last run log === | ||
Line 30: | Line 30: | ||
</pre> | </pre> | ||
Gets the last completed run log | Gets the last completed run log for script with given id. Returns the object with the following fields: Log, Exceptions, AdditionalData, OperationId. Returns null if the script is has never been run yet. Requires the global RunScript permission. Returns NotFound if a script does not exist, or Forbidden if current user has no access to the script. | ||
[[Category: QPR ProcessAnalyzer]] | [[Category: QPR ProcessAnalyzer]] |
Revision as of 14:30, 22 February 2021
Scripts API is used to start and stop script runs and get the current or last completed script run log.
Methods
The scripts API has the following methods.
Start script run
GET api/scripts/run/{scriptId}
Starts to run script with given id. Returns id of the started script run operation. Returns immediately without waiting for a script run to be finished. Returns 0 if the script is already running. Requires the global RunScript permission. Returns NotFound if a script does not exist, or Forbidden if current user has no access to the script.
End script run
GET api/scripts/end/{scriptId}
Terminates run of script with given id. Returns id of the terminated script run operation. Returns immediately without waiting for a script run to be aborted. Returns 0 if the script is not running. Requires the global RunScript permission. Returns NotFound if a script does not exist, or Forbidden if current user has no access to the script.
Get current run log
GET api/scripts/runlog/current/{scriptId}
Gets the current run log for script with given id, i.e. a run that is currently in progress. Returns the object with the following fields: Log, Exceptions, AdditionalData, OperationId. Returns null if the script is not running. Requires the global RunScript permission. Returns NotFound if a script does not exist, or Forbidden if current user has no access to the script.
Get last run log
GET api/scripts/runlog/last/{scriptId}
Gets the last completed run log for script with given id. Returns the object with the following fields: Log, Exceptions, AdditionalData, OperationId. Returns null if the script is has never been run yet. Requires the global RunScript permission. Returns NotFound if a script does not exist, or Forbidden if current user has no access to the script.