Setting the admin superuser password by using REST Administration APIs

System administrators can set the admin superuser password by using REST Administration APIs.

The admin superuser password is encrypted and stored locally to ensure that the Eclipse Amlen server can be administered even if the configured external LDAP server cannot be reached, or if the external LDAP server configuration is incorrect.

You can set the admin superuser password by using a REST Administration API, or by using the Amlen WebUI. For more information about using the Amlen WebUI to set the admin superuser password, see Configuring the admin endpoint by using the Amlen WebUI.

To set the admin superuser password, use the Eclipse Amlen REST API POST method.
  1. Use the following Eclipse Amlen configuration policy configuration URI:

    http://<admin-endpoint-IP:Port>/ima/v1/configuration/

  2. Provide object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json. Ensure that capitalization and double quotation marks are used as shown.
    
    {    
      "AdminUserPassword": "string"
    }
    Where:
    AdminUserPassword
    Specifies the admin superuser password.
    The maximum length of the admin superuser password is 16 characters.
    The default value is admin

The following example shows a POST method to set the admin superuser password to "examplePW" by using cURL:


curl -X POST \
   -H  'Content-Type: application/json'  \
   -d  '{
          "Version": "v1",
           "AdminUserPassword": "examplePW"
         }
  '   \
http://127.0.0.1:9089/ima/v1/configuration/

The following example shows an example response to the POST method:


{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}