Restart the IBM Watson IoT Platform - Message Gateway server

Purpose

Shut down the IBM® Watson IoT Platform - Message Gateway server and restart it. On restart, all IBM Watson IoT Platform - Message Gateway server processes start.

URI

Use the IBM Watson IoT Platform - Message Gateway REST API SERVICE method with the following IBM Watson IoT Platform - Message Gateway configuration URI:

http://<admin-endpoint-IP:port>/ima/v1/service/restart

Object configuration data

Provide object configuration data in the payload of the POST method by using one of the following schemas. Content-type is set to application/json:


{"Service":"Server","Maintenance":"start"|"stop"}

{"Service":"Server","CleanStore":true|false}
where:
Maintenance
Optional.
Specifies whether the server restarts in maintenance mode or production mode.
If Maintenance is set to start, the server restarts in maintenance mode. If Maintenance is set to stop, the server restarts in production mode.
CleanStore
Optional.
Specifies whether the store is cleaned as part of the shutdown process.
If CleanStore is set to true, then the store is cleaned as part of the shutdown process. The server does not need to be in maintenance mode for the store to be cleaned.
You cannot clean the store of an IBM Watson IoT Platform - Message Gateway server that is a member of a cluster.
Note: CleanStore and Maintenance are mutually exclusive and cannot be specified in the same payload.

Usage Notes

When IBM Watson IoT Platform - Message Gateway restarts, mqconnectivity also restarts. If you need to stop mqconnectivity, you can change the MQConnectivityEnabled configuration to false. To start mqconnectivity, set MQConnectivityEnabled to true.

Related REST Administration APIs

Example

Restart an IBM Watson IoT Platform - Message Gateway server in Maintenance mode by using cURL:

curl -X POST \
   -H  'Content-Type: application/json'  \
   -d  '{"Service":"Server","Maintenance":"start"}
  '   \
http://127.0.0.1:9089/ima/v1/service/restart