Editing the configuration of an LDAP server

You can edit an LDAP server configuration.

Method and URI

An LDAP server must be specified by using an {ldapId}. To update the configuration of an LDAP server, use a PUT method and a URI:

PUT     https://{hostname|IPv4}/ngp/ldap/{ldapId}

Tip

To get an {ldapId}, follow the instructions in Getting an {ldapId}.

Parameters

None.

Data

You can use the data key-value pairs that are described in Adding an LDAP server.

Example: Edit the configuration of an LDAP server

Assume that you want to edit the configuration of an LDAP server with the following {ldapId}: 1012. You want to assign the following values to this LDAP server:

  • Port: 636 (LDAP over SSL)

  • SSL: Enabled

A Python snippet that is similar to the following example can be used to update the configuration of the LDAP server:

ldap_id = "1012"

_data = f'''{{
    "portNumber":    636,
    "sslConnection": true
}}'''

requests.put('https://' + spp_ipv4 + '/ngp/ldap/' + ldap_id,
    headers={...}, data=_data, verify=...)
_images/reference_ldap_update02.png

Figure 53 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click System Configuration > LDAP/SMTP Servers and ensure that the LDAP Server tab is displayed. Click the Edit icon of the LDAP server you want to edit. Edit the configuration values and click Save.

After you run the Python snippet, ensure that you get a response with the HTTP status of 200 (OK) and that the LDAP server settings are updated. The response body is similar to the JSON object for Sales_Americas, as shown in Getting LDAP server information.