Configuring the licensed usage for IBM IoT MessageSight and accepting the license by using REST Administration APIs
System administrators can change the configured licensed usage for IBM® IoT MessageSight and accept the license by using a single REST Administration API.
About this task
You can set the licensed usage of your IBM IoT MessageSight and accept the license by using a single REST Administration API. The IBM IoT MessageSight server starts in maintenance mode until the license is accepted.
The license information is available in the /opt/ibm/imaserver/http/license directory for the Production, Non-Production, and IdleStandby license types, and in the /opt/ibm/imaserver/http/license/developer directory for the Developers license type. The license files are named LA_langcode.html where langcode is a two-character language code, for example, LA_en.html.
Procedure
Example
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
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}
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."
}
}
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."
}
What to do next
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": ""
}
}
curl -X GET http://127.0.0.1:9089/ima/v1/configuration/LicensedUsage
{
"Version":"v1",
"LicensedUsage": "Non-Production",
"Accept": true
}
You can restart the IBM IoT MessageSight server manually by using REST Administration APIs. For more information about restarting IBM IoT MessageSight, see Restart the IBM IoT MessageSight server.