Start Maintenance Mode with the Default Duration

put

/admin/v1/maintenance/start

Starts the maintenance mode. If you have deployed multiple replicas of the MicroTx coordinator, run this API on each replica. The default time buffer for the ongoing transactions to complete is 5 minutes. Before you begin, ensure that you run the `/admin/v1/maintenance/clear` REST call to clear any existing cached maintenance data in the data store. When you start the maintenance mode, the transaction logs for all the new requests in each replica of the MicroTx transaction coordinator are saved in both the cache and data store.

Request

There are no request parameters for this operation.

Back to Top

Response

Supported Media Types

200 Response

Ok, in maintenance mode

202 Response

Accepted, maintenance process started

500 Response

InternalServerError
Back to Top

Examples

cURL Command

The following example shows how to start the maintenance mode, with the default time buffer of 5 minutes for the ongoing transactions to complete, by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -X PUT 
     -H "Authorization:Bearer $OTMM_COOKIE"
     https://192.0.2.1:8080/admin/v1/maintenance/start
  • OTMM_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authenticate.

  • 192.0.2.1:8080 is an example REST endpoint URL. Change this value to the REST endpoint URL to access the Istio ingress gateway in your environment. For information about finding out REST endpoint URL for your site, see Send Requests.

Example of the Response Body

The following example shows the contents of the response body in JSON format.

{
     "message": "in maintenance mode"
}
Back to Top