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.
Each of these methods require the base URL to the OpenCDS Configuration REST Service, the username and the password.
The URL will likely be of the form:
http://localhost:18080/opencds-decision-support-service/config/v1/
which points to the Configuration REST services.
The username and password for the relevant user are configured as described in REST Security.
Get
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
--ee
retrieve the full collection of Execution Engines
--km
retrieve the full collection of Knowledge Modules (metadata)
--ss
retrieve the full collection of Semantic Signifiers
--pp
retrieve the full collection of Plugin Packages
--cdmid <CDMID>
retrieves the Concept Determination Method specified by CDMID
--eeid <EEID>
retrieves the Execution Engine metadata specified by EEID
--kmid <KMID>
retrieves the Knowledge Module metadata specified by KMID
--kmid <KMID> --kmp
retrieves the Knowledge Module package associated with the Knowledge Module specified by KMID
--kmid <KMID> --sd
retrieve the full collection of Supporting Data (metadata) associated with the Knowledge Module specified by KMID
--kmid <KMID> --sdid <SDID>
retrieves the Supporting Data (metadata) specified by SDID associated with the Knowledge Module specified by KMID
--kmid <KMID> --sdid <SDID> --sdp
retrieves the Supporting Data package specified by SDID associated with the Knowledge Module specified by KMID
--ssid <SSID>
retrieves the Semantic Signifier metadata specified by the SSID
--ppid <PPID>
retrieve the Plugin Package metadata specified by the PPID
Upload
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.
--kmid <KMID> --kmp --file <Knowledge Module package file>
Upload a Knowledge Package associated with the Knowledge Module specified by KMID.
--kmid <KMID> --sdid <SDID> --file <Supporting Data metadata file>
Upload a Supporting Data metadata file specified by SDID associated with the KnowledgeModule specified by the KMID.
--kmid <KMID> --sdid <SDID> --sdp --file <Supporting Data package file>
Upload a Supporting Data data package specified by SDID associated with the KnowledgeModule specified by KMID.
Delete
sh ./bin/delete.sh --url <url> --username <user> --password <pass>
.\bin\delete.bat --url <url> --username <user> --password <pass>
Options
--eeid <EEID>
Delete the Execution Engine specified by the EEID.
--kmid <KMID>
Delete the Knowledge Module specified by the KMID.
--kmid <KMID> --kmp
Delete the Knowledge Package specified by the KMID.
--kmid <KMID> --sdid <SDID>
Delete the Supporting Data metadata specified by the KMID and associated with the specified SDID.
--kmid <KMID> --sdid <SDID> --sdp
Delete the Supporting Data package specified by the KMID and associated with the specified SDID.
--ssid <SSID>
Delete the Semantic Signifier specified by the SSID.
--ppid <PPID>
Delete the Plugin Package specified by the PPID.
Transfer
sh ./bin/transfer.sh --url <url> --username <user> --password <pass>
.\bin\transfer.bat --url <url> --username <user> --password <pass>