Skip to content

admin Command Group¤

Import bootstrap data, backup/restore workspace or get status.

This command group consists of commands for setting up and configuring eccenca Corporate Memory.

admin status¤

Output health and version information.

$ cmemc admin status [OPTIONS]

This command outputs version and health information of the selected deployment. If the version information cannot be retrieved, UNKNOWN is shown.

Additionally, this command informs you in one of these cases: (1) A warning, if the target version of your cmemc client is newer than the version of your backend. (2) A warning, if the ShapeCatalog has a different version than your DataPlatform component. (3) An error, if your Corporate Memory license is expired (grace period). (4) A warning, if your Graph DB license will expire in less than a month.

To get status information of all configured deployments use this command in combination with parallel.

$ cmemc config list | parallel --ctag cmemc -c {} admin status
--key TEXT                     Get only specific key(s) from the status /
                               info output. There are two special keys
                               available: 'all' will list all available keys
                               in the table, 'overall.healthy' with result
                               in  UP in case all health flags are UP as
                               well (otherwise DOWN).
--exit-1 [never|error|always]  Specify, when this command returns with exit
                               code 1. Available options are 'never' (exit 0
                               on errors and warnings), 'error' (exit 1 on
                               errors, exit 0 on warnings), 'always' (exit 1
                               on errors and warnings).  [default: never]
--enforce-table                A single value with --key will be returned as
                               plain text instead of a table with one row
                               and the header. This default behaviour allows
                               for more easy integration with scripts. This
                               flag enforces the use of tabular output, even
                               for single row tables.
--raw                          Outputs combined raw JSON output of the
                               health/info endpoints.

admin token¤

Fetch and output an access token.

$ cmemc admin token [OPTIONS]

This command can be used to check for correct authentication as well as to use the token with wget / curl or similar standard tools:

$ curl -H "Authorization: Bearer $(cmemc -c my admin token)" $(cmemc -c my config get DP_API_ENDPOINT)/api/custom/slug

Please be aware that this command can reveal secrets which you might not want to be present in log files or on the screen.

--raw       Outputs raw JSON. Note that this option will always try to fetch
            a new JSON token response. In case you are working with
            OAUTH_GRANT_TYPE=prefetched_token, this may lead to an error.
--decode    Decode the access token and outputs the raw JSON. Note that the
            access token is only decoded and esp. not validated.