B2B Integration

 View Only
  • 1.  How to obtain using CLI the configuration information of SSPCM

    Posted Thu January 16, 2020 10:19 AM
    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


  • 2.  RE: How to obtain using CLI the configuration information of SSPCM

    Posted Fri January 17, 2020 11:27 AM
    Hi Alejandro,

    Sterling Secure Proxy Configuration Manager (SSPCM) provides APIs to communicate to perform CRUD operations on the configurations. You can create a script which will invoke these APIs to get the status or update of any adapter/policy/netmap configurations on SSPCM. Following is the link to SSP APIs:

    API Explorer

    I hope this will help you.

    Regards,

    ------------------------------
    Malagouda Patil
    ------------------------------



  • 3.  RE: How to obtain using CLI the configuration information of SSPCM

    Posted Mon July 27, 2020 03:13 PM
    The sspCM RestAPI may expose what you need.

    ------------------------------
    Dustin Souers
    ------------------------------



  • 4.  RE: How to obtain using CLI the configuration information of SSPCM

    Posted Tue July 28, 2020 11:55 AM
    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
    ------------------------------