Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel2

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):

...

 

Code Block
languagegroovy
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
GET
GET
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

...

retrieve the Plugin Package metadata specified by the PPID

 

Anchor
UPLOAD
UPLOAD
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.

...

Upload a Supporting Data data package specified by SDID associated with the KnowledgeModule specified by KMID.

Anchor
DELETE
DELETE
Delete

sh ./bin/delete.sh --url <url> --username <user> --password <pass>

.\bin\delete.bat --url <url> --username <user> --password <pass>

Options

--cdmid <CDMID>
Delete the specified Concept Determination Method specified by the CDMID.

...

Delete the Plugin Package specified by the PPID.

 

Anchor
TRANSFER
TRANSFER
Transfer

sh ./bin/transfer.sh --url <url> --username <user> --password <pass>

.\bin\transfer.bat --url <url> --username <user> --password <pass>

Options

--folder <folder>
The folder from which all configuration artifacts will be read to transfer a file-based repository to a remote REST-accessible repository.