Editing the configuration of an LDAP server

Edit an LDAP server configuration.

Method and URI

Although IBM Spectrum Protect Plus supports up to one LDAP server, you have to specify it using {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

The same as the available Data key-value pairs in Adding an LDAP server.

Example: Edit the configuration of an LDAP server

Assume that you want to edit the LDAP server that has been added to IBM Spectrum Protect Plus. You get the {ldapId} of it: 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 55 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click System Configuration > LDAP / SMTP 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.