Start collaborating
Join us for IBM TechXchange Day: AI and Automation
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 differentExample : replica = xxx.xx.x.01 and replica = xxx.xx.02
Below is my shell script
#!/bin/sh[ "$DEBUG" ] && set -xappliance_hostname=$1username=$2password=$3configurationfile=$4stanza=$5entry=$6value=$7entry1=$8value1=$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,
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
image002.png@01D85F83.85516C50">