1. Find the LDAP server "id" (to be used in the second call) with: curl -X GET --header "Accept: /" -u superuser:suser "http://yourserver.net:8080/datamanagement/ra/administration/v5/directory-servers"This will return something like the following. We need the ID value as shown at the bottom:
{
"list": [
{
"directoryServerConnection": {
"isSSL": false,
"directoryServerType": "ACTIVE_DIRECTORY",
"adminPassword": "F89AE8809815F0AD08D7116CA9BE123E",
"serverName": "myadservername",
"domainName": "stegr04.te.com",
"serverPort": 389
},
"directoryServerAuth": {
"groupFilter": "(|(member={0})(uniquemember={0}))",
"userSearchBase": "ou=people,ou=system",
"userFilter": "uid={0}",
"groupSearchBase": "ou=groups,ou=system"
},
"directoryServerImportDetails": {
"userSearchPattern": "cn={0}*",
"groupSearchPattern": "cn={0}*"
},
"serverAttributeMapping": {
"email": "mail",
"firstName": "givenName",
"lastName": "sn",
"uniqueUserName": "userPrincipalName"
},
"name": "stegr04.te.com",
"id": "1"
}
]
}
2. Use the ID for the directory server, in this case, "1" and place the ID after /datamanagement/a/administration/v5/directory-servers/ as shown in the following PATCH REST api call example:curl -s -X PATCH 'http://yourserver:8080/datamanagement/a/administration/v5/directory-servers/1' --header "Accept: application/json" -u superuser:suser --data-binary '{"directoryServerConnection":{"adminPassword":"MYNEWPASSWD","isSSL":false},"directoryServerAuth":{},"directoryServerImportDetails":{},"serverAttributeMapping":{}}' --compressed --insecure -H 'Content-Type: application/json;charset=UTF-8'the data-binary piece, prettified, is this:
{ "directoryServerConnection":{ "adminPassword":"myldappasswd", "isSSL":false }, "directoryServerAuth":{}, "directoryServerImportDetails":{}, "serverAttributeMapping":{}}