Configuring the licensed usage for Eclipse Amlen and accepting the license by using REST Administration APIs
System administrators can change the configured licensed usage for Eclipse Amlen and accept the license by using a single REST Administration API.
The following example shows setting Eclipse Amlen licensed usage to
Non-Production
without accepting the
license:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"LicensedUsage": "Non-Production"
}
' \
http://127.0.0.1:9089/ima/v1/configuration
An
example response to the POST
method:
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}
As
the license is not accepted, when you view the server status by using the REST API GET
method:
curl -X GET http://127.0.0.1:9089/ima/v1/service/status/Server
The
server status
shows:
{
"Version":"v1",
"Server": {
"Name": "RDDockDev1:9089",
"UID": "poHdWvCE",
"Status": "Running",
"State": 9,
"StateDescription": "Running (maintenance)",
"ServerTime": "2016-04-12T19:01:23.512Z",
"UpTimeSeconds": 27,
"UpTimeDescription": "0 days 0 hours 0 minutes 27 seconds",
"Version": "2.0 20160610-0700",
"ErrorCode": 387,
"ErrorMessage": "IBM MessageSight is not fully functional until you accept the license agreement using IBM IoT MessageSight REST API."
}
}
The following example shows setting Eclipse Amlen licensed
usage to
An
example response to the POST
method:Non-Production
and accepting the license by using
cURL:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"LicensedUsage": "Non-Production",
"Accept": true
}
' \
http://127.0.0.1:9089/ima/v1/configuration
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}
Check the server status to verify that the Eclipse Amlen server has successfully restarted. It
might take a few seconds for the server to stop and restart. You can view the server status
by using the following REST API GET
method:
curl -X GET http://127.0.0.1:9089/ima/v1/service/status/Server
The
server status shows:
{
"Version":"v1",
"Server": {
"Name": "RDDockDev1:9089",
"UID": "poHdWvCE",
"Status": "Running",
"State": 1,
"StateDescription": "Running (production)",
"ServerTime": "2016-04-27T15:59:51.491-05:00",
"UpTimeSeconds": 27,
"UpTimeDescription": "0 days 0 hours 0 minutes 27 seconds",
"Version": "2.0 20160610-0700",
"ErrorCode": 0,
"ErrorMessage": ""
}
}
View the value of the current license type by using the following REST API GET method:
curl -X GET http://127.0.0.1:9089/ima/v1/configuration/LicensedUsage
An example response to the GET method:
{
"Version":"v1",
"LicensedUsage": "Non-Production",
"Accept": true
}
You can restart the Eclipse Amlen server manually by using REST Administration APIs. For more information about restarting Eclipse Amlen, see Restart the Eclipse Amlen server.