REST Capabilities
REST is now the de facto standard for modern online tool integrations. SIL supports REST is several different ways, through HTTP functions to make outgoing REST calls. Through SIL Webhooks to support incoming REST calls, and through the SIL REST Service for ad-hoc incoming calls.
HTTP Functions
For more information about using HTTP Functions to make outgoing calls, see the information below:
Webhooks
For more information about creating new REST endpoints that can process whatever format the data is received in, see the Web Hook Configurations page.
Common REST Service
Starting with version 2.5.5, SIL Engine™ exposes a REST service to facilitate arbitrary execution of SIL™ scripts. These services are available via HTTP POST at <your_base_url>/rest/keplerrominfo/refapp/latest/async-script and <your_base_url>/rest/keplerrominfo/refapp/latest/async. The service responses are all JSON formatted (see Beans below).
You will notice that most of the methods will schedule a task for execution and will provide a unique identifier for the task. You will have to call getResults and provide the identifier to check the status of the task (running or finished) and retrieve the results.
Authentication
Note that all the services require that the calling user is authenticated. You can use Basic authentication with your HTTP request.
Services
Method | Full Path | Availability |
---|---|---|
findScriptFiles | <your_base_url>/rest/keplerrominfo/refapp/latest/async-script/findScriptFiles | 4.0.0+ |
checkScript | <your_base_url>/rest/keplerrominfo/refapp/latest/async-script/checkScript | 4.0.0+ |
runScript | <your_base_url>/rest/keplerrominfo/refapp/latest/async-script/runScript | 4.0.0+ |
runDetachedScript | <your_base_url>/rest/keplerrominfo/refapp/latest/async-script/runDetachedScript | 4.0.0+ |
getResult | <your_base_url>/rest/keplerrominfo/refapp/latest/async/getResult | 4.0.0+ |
findScriptFiles
Allows you to scan a folder for specific files where the filename matches a specific regular expression.
Parameter | Type | Required | Description |
---|---|---|---|
dirPath | string | yes | The path of the directory to scan. Can be absolute or relative to the silprograms folder. If absolute, it must still point to a location under silprograms. |
regex | string | yes | The regular expression to match the filenames against |
Returns a REST Capabilities#ScriptFileListResponse.