Managing and Running Scripts
Once you have completed the creation of your script, you need to publish it to the repository manager for execution.This is done by REST API invocations.
For Repository Manager version 3.8.x and onwards, the REST API endpoint is:
For Repository Manager versions pre 3.8.x, the REST API endpoint is:
The following examples given below are against NXRM version 3.8+ so please amend the endpoint accordingly if running any NXRM 3 version before that.
This endpoint accepts JSON-formatted payloads with your script as the
Example JSON formatted file
maven.json with a simple repository creation script:
The JSON file
maven.json located in the current directory can be published to the repository manager with an HTTP POST like:
A list of scripts stored on the repository manager can be accessed with:
The same call with a script name appended returns the actual script content.
A script can be executed by sending a POST to the run method of the specific script.
A successful execution should result in a
HTTP/1.1 200 OK.
Scripts can be removed with a HTTP DELETE operation to the specific script:
Scripts can receive run-time parameters via the REST API:
and receive them as arguments that have to be parsed by the script as desired:
Interaction with the REST API for scripts can be done with any scripting language capable of HTTP calls as mentioned above. In the following section you can find some further detailed examples.