IBM Verify

IBM Verify

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Add Multiple Key Value using Shell Script and Rest Api

    Posted 05/28/24 09:27 AM

    Hi Team,

    Is it possible to update the ldap.conf file using rest api in which the keys are of same name but values are different
    Example : replica = xxx.xx.x.01 and replica = xxx.xx.02

    Below is my shell script

    #!/bin/sh
    [ "$DEBUG" ] && set -xappliance_hostname=$1
    username=$2
    password=$3
    configurationfile=$4
    stanza=$5
    entry=$6
    value=$7
    entry1=$8
    value1=$9[ "$CURL" ]  || CURL="curl -s -k -u "$username:$password""${CURL} -H "Accept: application/json" -H 'Content-Type: application/json' -X PUT https://${appliance_hostname}/isam/runtime/${configurationfile}/configuration/stanza/${stanza}/entry_name/${entry} --data-ascii '{"value":"'${value}'"}'${CURL} -H "Accept: application/json" -H 'Content-Type: application/json' -X PUT https://${appliance_hostname}/isam/runtime/${configurationfile}/configuration/stanza/${stanza}/entry_name/${entry1} --data-ascii '{"value":"'${value1}'"}'exit $?



    ------------------------------
    Sachin Kumbhar
    ------------------------------


  • 2.  RE: Add Multiple Key Value using Shell Script and Rest Api

    Posted 05/28/24 06:52 PM

    Sachin,

     

    You should be able to do a POST on the stanza endpoint.  Here is an extract from the Web services documentation:

     

    POST https://{appliance_hostname}/wga/reverseproxy/{reverseproxy_id}/configuration/stanza/{stanza_id}/entry_name

     POST_DATA: {

      entries: [

                                       ["entryName1", "value1"],

                                       ["entryName2", "value2"]

                              ]

                          }

     

    You should be able to specify the same entry name multiple times within the POST body.

     

    I hope that this helps.

     

    Scott A. Exton
    Senior Software Engineer
    Chief Programmer - IBM Security Verify Access

    IBM Master Inventor

    cid4122760825*<a href=image002.png@01D85F83.85516C50">