Event Routing 10.7 | Communicating between Software AG Products Using Event Routing | Event Routing for Developers | Developing Applications for Configuring Event Routing | Using the Command Central REST API for Configuring Event Routing | Examples for Using the Command Central REST API for Configuring Event Routing
 
Examples for Using the Command Central REST API for Configuring Event Routing
In order to be able to configure Event Routing using the Command Central REST API, you should be familiar with the landscape, inventory, and configuration services of Command Central.
To get detailed information about which REST URLs are supported by the services, and how they can be used with the HTTP methods GET, PUT, POST, and DELETE, issue the following calls:
*http://cc-host:cc-port/cce/landscape/application.wadl
*http://cc-host:cc-port/cce/inventory/application.wadl
*http://cc-host:cc-port/cce/configuration/application.wadl
Where cc-host is the name of the host machine where you have installed Command Central, and cc-port is the port number where the Command Central instance is running.
The following sample REST URLs assume that your Command Central server can be reached under localhost:8090, where localhost is the node alias of the default installation.
*GET http://localhost:8090/cce/landscape/nodes - gets all nodes (and their nodeAliases) in the landscape.
*GET http://localhost:8090/cce/inventory/components - gets all runtime components in the landscape. Component IDs for Event Routing always end with “EventRouting”. For example, “OSGI-SPM-EventRouting” is the ID of the Event Routing component installed inside Software AG Platform Manager.
*GET http://localhost:8090/cce/configuration/instances/{nodeAlias}/{runtimeComponentId} - gets all metadata for all configuration instances of a specific component on the defined node. For example,
GET http://localhost:8090/cce/configuration/instances/local/OSGI-SPM-EventRouting
gets metadata for all configuration instances of the “OSGI-SPM-EventRouting” component on the “local” node. This metadata contains the configuration ID which is required in other REST calls.
*GET http://localhost:8090/cce/configuration/data/{nodeAlias}/{runtimeComponentId}/{configurationInstanceId} - gets the actual configuration data for a configuration instance in a specified runtime component. For example,
GET http://localhost:8090/cce/configuration/data/local/OSGI-SPM-EventRouting/UniversalMessaging
gets the actual configuration data of the “UniversalMessaging” configuration of the “OSGI-SPM-EventRouting” component. You can use PUT with the same REST URL to update the configuration instance. You can use DELETE with the same REST URL to delete the configuration instance.
*GET http://localhost:8090/cce/configuration/types/{nodeAlias}/{runtimeComponentId} - gets all configuration types that can be used with a specified runtime component. For example,
GET http://localhost:8090/cce/configuration/types/local/OSGI-SPM-EventRouting
gets all configuration types that can be used with the “OSGI-SPM-EventRouting” component.
The Event Routing component has the following configuration types: RUNTIME-CONFIGURATION, SERVICE-GROUP, COMMON-WMMESSAGING-ER, EVENT-TYPE-ASSOCIATIONS.
*POST http://localhost:8090/cce/configuration/data/{nodeAlias}/{runtimeComponentId}/{configurationTypeId} - creates a new configuration object of the specified configuration type of the component. For example,
POST http://localhost:8090/cce/configuration/data/local/OSGI-SPM-EventRouting/SERVICE-GROUP
creates a new configuration object of type “SERVICE-GROUP” of the “OSGI-SPM-EventRouting” component.