Setting the admin superuser ID by using REST Administration APIs

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

You can set the admin superuser ID 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 ID, see Configuring the admin endpoint by using the Amlen WebUI.

To set the admin superuser ID, 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.
    
    {    
      "AdminUserID": "string"
    }
    Where:
    AdminUserID
    Specifies the admin superuser ID.
    The maximum length of the admin superuser ID is 16 characters.
    The default value is admin

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


curl -X POST \
   -H  'Content-Type: application/json'  \
   -d  '{
          "Version": "v1",
           "AdminUserID": "testAdminUser"
         }
  '   \
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."
}