Table of Contents | ||
---|---|---|
|
Overview
A command-line tool is provided with the OpenCDS distribution, which may be run in any MacOSX/Linux based terminal, or the windows console or powershell.
Four options exist for working with the Configuration REST Services, namely Configuration REST Client, Configuration REST Client, Configuration REST Client, Configuration REST Client GET, UPLOAD, DELETE, TRANSFER.
Each of these methods require the base URL to the OpenCDS Configuration REST Service, the username and the password.
...
The username and password for the relevant user are configured as described in REST Security.
Configuration File
For simplification of interactions with many OpenCDS instances (or even one), the code accepts a --config option as follows (using UPLOAD–see option below):
sh ./bin/upload.sh --config <groovy configuration file> <options>
.\bin\upload.bat --config <groovy configuration file> <options>
Code Block | ||
---|---|---|
| ||
cli {
url = "http://my-opencds.org:8080/opencds-decision-support-service/config/v1" // or
urls = [
'http://one.my-opencds.org:8080/opencds-decision-support-service/config/v1',
'http://two.my-opencds.org:8080/opencds-decision-support-service/config/v1',
'http://three.my-opencds.org:8080/opencds-decision-support-service/config/v1'
]
username = "my-admin-username"
password = "my-admin-password"
}
|
Either url
and urls
may be used to specify the URL of each instance of OpenCDS.
If none of these exist in this configuration file, the code will require the options to be specified on the command-line.
Anchor | ||||
---|---|---|---|---|
|
sh ./bin/get.sh --url <url> --username <user> --password <pass> --outfile <file>
.\bin\get.bat --url <url> --username <user> --password <pass> --outfile <file>
Options
--cdm
retrieve the full collection of Concept Determination Methods
...
retrieve the Plugin Package metadata specified by the PPID
Anchor | ||||
---|---|---|---|---|
|
sh ./bin/upload.sh --url <url> --username <user> --password <pass>
.\bin\upload.bat --url <url> --username <user> --password <pass>
Options
--file <file>
Upload a file from the filesystem. In most cases, the type is detected from the input.
...
Upload a Supporting Data data package specified by SDID associated with the KnowledgeModule specified by KMID.
Anchor | ||||
---|---|---|---|---|
|
sh ./bin/delete.sh --url <url> --username <user> --password <pass>
.\bin\delete.bat --url <url> --username <user> --password <pass>
Options
...
Delete the Plugin Package specified by the PPID.
Anchor | ||||
---|---|---|---|---|
|
sh ./bin/transfer.sh --url <url> --username <user> --password <pass>
.\bin\transfer.bat --url <url> --username <user> --password <pass>