Hi,
There is the sspRestAPI.sh script and a sspRestAPI.properties file in the CM bin directory. These 2 files together will invoke the RestAPI to change or modify the configuration for the SSP Configuration Manager.
The sspRestAPI.sh calls the sspRestAPI.properties as shown in the following example:
./sspRestAPI.sh -f props=sspRestAPI.properties
You can modify or copy the sspRestAPI.properties to another name and make changes to get, update or create configurations.
First you must change these 5 parameters in the sspRestAPI.properties file located in the CM bin directory. This is a 1 time change.
## SSP CM WEBSERVER HOST ip address - will default to default CM IP address
SSP_CM_WEBSERVER_HOST=localhost
## SSP CM WEBSERVER TCP PORT - will default to current CM TCP PORT
SSP_CM_WEBSERVER_PORT=8443
## SYSTEM PASSPHRASE - the passphrase used for decrypting CM configuration files, will be promp
ted if not specified
##
SYSTEM_PASSPHRASE=********
## ADMIN ID for logging into the REST API - will be prompted if not specified
ADMIN_ID=admin
##
## ADMIN PASSWORD for loggin into the REST API - will be prompted if not specified
ADMIN_PASSWORD=********
Here is an example to get and put an adapter.
GET Adapter:
Make a copy of the sspRestAPI.properties file to sspRestAPI.properties.GetAdapter
In the sspRestAPI.properties.GetAdapter file you just created, uncomment the line called "command.403=get" and put in the workdir to the full path to the CM bin directory and the adapter name you want to get.
command.1=get entity=adapter workDir=/home/sspuser/SSP3432/sspcm1/bin name=CDAdapter1
To make the properties file cleaner you can remove all the other commented out commands.
Run this command from the CM bin directory:
./sspRestAPI.sh -f props=sspRestAPI.properties.GetAdapter
This will create an .xml file called CDAdapter1.xml in the /home/sspuser/SSP3432/sspcm1/bin directory.
Put Adapter:
Copy the CDAdapter1.xml file to CDAdapter1a.xml or whatever name you want.
If you are creating a new adapter name for the same CM, modify the CDAdapter1a.xml and give it a new adapter name CDAdapter1a and also change the listening port.
Make a copy of the sspRestAPI.properties.GetAdapter file to sspRestAPI.properties.PutAdapter
In the sspRestAPI.properties.PutAdapter file you just created, change the get command to a put command as shown below. Put in the inputFile to the full path to the CM bin directory and the adapter name you want to put.
command.1=create entity=adapter name=CDAdapter1a inputFile=/home/sspuser/SSP3432/sspcm1/bin/CDAdapter1a.xml
Run this command from the CM bin directory:
./sspRestAPI.sh -f props=sspRestAPI.properties.PutAdapter
This will add the new adapter CDAdapter1a to the SSP CM.
Also you can use REST API export/import objects as per https://www.ibm.com/support/knowledgecenter/en/SS6PNW_3.4.2/com.ibm.help.ssp.apis.doc/ssp_apis_cmconfig.html by using tools like postman tool/utility.
i hope this will help you.
thanks,
+Nageswararao Asi
View the lines in the original sspRestAPI.properties file to view all the various commands you can perform. Make a copy of the sspRestAPI.properties file to a name that depicts the function you are wanting to do then uncomment out the line for that function. Be sure you change the information in that line to match your environment.
------------------------------
Nageswararao Asi
------------------------------
Original Message:
Sent: Wed January 15, 2020 10:40 PM
From: Alejandro Rodriguez
Subject: How to obtain using CLI the configuration information of SSPCM
GREETINGS
I know for example (in Sterling B2B Integrator) that you can obtain status, info using opscmd.sh or querying the directly to database or using db_exec.sh or db_execFile.sh. I want to do something similar but querying to SSPCM.
The idea is to obtain configuration of service adapters of SSP and PS.
thanks in advance
------------------------------
Alejandro Rodriguez
------------------------------
#B2BIntegration
#SupplyChain