The REST API provides the following methods to manage configurations specifically in automated deployment scenarios:

These methods are a straightforward and platform-independent mechanism for loading configurations. However, some of the methods have been designed to replace your existing configuration completely with a new one. For this reason, when partial configuration changes are required, it is recommended you use Rhapsody IDE. It is also recommended you test the new configuration on a staging environment that closely matches the production one before automatically deploying the changes into production.

REST API methods for configuration administration do not handle lookup tables, Rhapsody variables, security objects, the Web Services User Store, custom modules and libraries, or templates. To manage these Rhapsody objects, refer to:

GET /admin/config/status/<id>

URI

GET /admin/config/status/<id>

Description

Returns the status of the current configuration load.

Request Header

Content-Type: application/json

Content-Type: application/vnd.orchestral.rhapsody.6_1+json

Request Body

Empty.

Response Status

204 No Content - operation successful.

Response Body

Status of the current load in JSON format. The response body has the following structure:

  • state - the current state of the load: RUNNING, COMPLETED, FAILED.
  • result - the result, if the state is COMPLETED.
    • resultType - the actual result: FAIL_WITH_ERRORS, SUCCESS, SUCCESS_NO_CHANGES, SUCCESS_WITH_WARNING.
    • configErrors - [list] all configuration errors and/or warnings.
      • errorCode - [string] the error code.
      • severity - error severity: FATAL, ERROR, WARNING.
      • errorMessage - [string] the error message.

For example:

COMPLETED Response
{"data":{"state":"COMPLETED","result":{"resultType":"SUCCESS","configErrors":null}},"error":null}
RUNNING Response
{"data":{"state":"RUNNING","result":null},"error":null}

Access Rights

'Log in to Rhapsody IDE'.
'Load configurations'.
'Load configuration REST API '.

GET /admin/config

URI

GET /admin/config

Description

Returns the configuration in the datastore in a ZIP format (the configuration in this format can only be loaded onto the engine through the POST /admin/config method).

As of Rhapsody 6.2.2, the temporary configuration file is located in Rhapsody's \data\tmp\configSave folder, instead of the system temp directory. The file is automatically deleted and therefore does not require manual deletion.

Request Header

Accept: application/zip

Accept: application/vnd.orchestral.rhapsody.6_1+zip

Accept: application/vnd.orchestral.rhapsody.6_2_2+zip

Request Parameter

saveTestMessagestrue or false. Whether the configuration includes filter or connector test messages. This parameter is optional. Test messages are not saved if this parameter is not set.

compressTestMessages - true (default) or false. When set to false, the test messages will be saved in an expanded format, in other words in plain XML instead of a string of compressed XML.

Request Body

Empty.

Response Status

200 OK - returns the configuration in ZIP format.

Response Body

The response body has the following structure:

  • auxiliary - [folder] stores auxiliary files. The sub-folders are named after the UUID of the component that owns them.
  • definition - [folder] stores definition files. The sub-folders are named after the UUID of the definition.
  • test messages - [folder] stores filter and connector test message files. The sub-folders are named after the UUID of the component that owns them.  
  • wsdl - [folder] stores the original WSDL and associated schema files. The sub-folders are named after the UUID of the web service.

  • configuration.xml - [xml] the configuration XML file.

The configuration XML file has the following structure:

  • configuration - the root configuration element.
    • rootFolder - the parent folder.
    • lockers - contains all locker-based configurations.
      • folders - contains all folder configurations.
      • communicationPoints - contains all communication point configurations.
      • routes - contains all route configurations.
      • restClients - contains all REST client configurations.
      • trackingSchemes - contains all message tracking scheme configurations.
      • definitions - contains all definition configurations.
      • intelligentMapperProjects - contains all Intelligent Mapper mapping project configurations.
      • x12Projects - contains all X12 project configurations.
    • webServices - contains all web service configurations.
    • sharedJSLibraries - contains all shared JavaScript library configurations.

Refer to configuration.xml for an example of the configuration XML file.

Access Rights

'Log in to Rhapsody IDE'.
'Locker view' (for all lockers in the engine).

'Save configurations'.
'Save configuration REST API'.

POST /admin/config

Intended Use

Loading a configuration using this REST API method:

  • Overwrites your previous Rhapsody configuration (with the exception of lookup tables, Rhapsody variables, security objects, Web Services User Store, custom modules and libraries, and templates), and
  • May result in the loss of live messages on deleted communication points and routes.

Therefore, only use this method if you want to replace your existing configuration completely with a new one. For partial configuration changes, it is recommended you use Rhapsody IDE. Furthermore, this method stops all components on successfully loading a new configuration. It then:

  • Applies the value in the startupState attribute for each route and communication point, and
  • Restarts all the web services.

URI

POST /admin/config

Description

Clears the existing configuration and loads the one provided in ZIP format (as created by calling the GET /admin/config method).

The configuration will fail to load if you do not have the 'Clear configurations' access right.

You can disable this method by setting the Rlc.overwriteConfiguration.enabled property in the rhapsody.properties file to false.

It is recommended that Rhapsody variables, lookup tables, security objects and the Web Services User Store are loaded prior to loading the configuration. Any missing Rhapsody variables can result in affected components entering an unconfigured state due to missing dependencies.

Request Header

Content-Type: application/zip
CSRF Protection Enabled

Content-Type: application/vnd.orchestral.rhapsody.6_1+zip
CSRF Protection Enabled

Content-Type: application/vnd.orchestral.rhapsody.6_2_2+zip
CSRF Protection Enabled

Request Parameter

commitComment - a string containing the comment to use for the commit. This parameter is mandatory.

Request Body

The content of the configuration in the data store in ZIP format.

Response Status

204 No Content - operation successful.
202 Accepted - the request is being processed. The URI provided in the Response Header can be used to check the status of the operation. Refer to GET /admin/config/status/<id> for details on fetching the load state. 

Response Header

The load status URI:

Location: https://localhost:8444/admin/config/status/1

Response Body

Empty when the operation is successful.

Access Rights

'Log in to Rhapsody IDE'.
'Make changes with IDE'.

'Clear configurations'.
'Load configurations'.
'Load configuration REST API'.

You must have the appropriate access rights to modify certain parts of the configuration. For example, to modify web services, you will require the 'Edit web services' access right.