Configuring the server name by using REST Administration APIs
System administrators can set and view the configured name of a server by using REST Administration APIs.
If the Eclipse Amlen server is an active cluster member, do not change ServerName.
The following example shows a POST method to set the server name to "myServer.TestSystem" by using cURL:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"ServerName":"myServer.TestSystem:9089"
}
' \
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."
}
The following example shows a GET method to view the server name by using cURL:
curl -X GET http://127.0.0.1:9089/ima/v1/configuration/ServerName
The following example shows an example response to the GET method:
{
"ServerName": "myServer.TestSystem:9089",
"Version": "v1"
}
The following example shows a POST method to set the server name to the default value by using cURL:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"ServerName": null
}
' \
http://127.0.0.1:9089/ima/v1/configuration/
The following example shows an example response to the GET method:
{
"ServerName": "ServerA.mycompany.com:9089",
"Version": "v1"
}