API for Stopping Services on Cluster Nodes

Function

Stops services on the cluster nodes.

This API does not need to be called by users. It is a communication API between the Coordinator and Controller.

Format

Operation type: POST

URL: https://{ip}:{port}/v1/instances/offline

  • Preferably set {ip} to {manage_ip} in Starting Coordinator. If the parameter is not configured, set {ip} to the value of the manage_ip parameter in the ms_coordinator.json configuration file.
  • Preferably set {port} to {manage_port} in Starting Coordinator. If the parameter is not configured, set {port} to the value of the manage_port parameter in the ms_coordinator.json configuration file.

Request Parameters

Parameter

Type

Description

ids

uint64_t[]

Mandatory.

ID of the node where the service is stopped.

Usage Example

Request example:

POST https://{ip}:{port}/v1/instances/offline

Request body:

{
    "ids": [
        0,1
    ]
}

Response example:

In normal cases, there is no response message body.

Output Description

  • If the JSON format and fields in the request body are correct, the 200 status code is returned.
  • If the Coordinator is not ready, the 503 status code is returned.
  • If the request body format is incorrect, the 400 status code is returned.