Description
You can call this operation to stop an OceanBase cluster.
Call description
Prerequisites
You have the permission to stop the OceanBase cluster.
For more information about the permissions, see Security overview.
You have passed the authentication for the OCP application service.
Request path
POST /api/v2/ob/clusters/{id}/stop
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the OceanBase cluster to be stopped. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task information. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
POST /api/v2/ob/clusters/1/stop
Sample response
{
"data": {
"cluster": {
"id": 21,
"name": "ob_upgrade",
"obClusterId": 22
},
"context": "Context(parallelIdx=-1, stringMap={cluster_name=ob_upgrade, cluster_id=21, former_cluster_status=RUNNING}, listMap={server_ids=[5], zone_names=[zone1]})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 107302,
"name": "Stop OB cluster",
"startTime": "2021-03-02T10:29:04.849+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Wait node",
"downstreams": [
128802
],
"id": 128795,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128796
]
},
{
"description": "Prepare stop observer",
"downstreams": [
128795
],
"id": 128796,
"name": "Prepare stop observer",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128803
]
},
{
"description": "Update OB cluster status",
"downstreams": [
],
"id": 128797,
"name": "Update OB cluster status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128805
]
},
{
"description": "Prepare stop OB zone",
"downstreams": [
128803
],
"id": 128798,
"name": "Prepare stop OB zone",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128801
]
},
{
"description": "Wait node",
"downstreams": [
128805
],
"id": 128799,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128804
]
},
{
"description": "Wait node",
"downstreams": [
128804
],
"id": 128800,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128802
]
},
{
"description": "Prepare stop cluster",
"downstreams": [
128798
],
"id": 128801,
"name": "Prepare stop cluster",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Stop observer process",
"downstreams": [
128800
],
"id": 128802,
"name": "Stop observer process",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128795
]
},
{
"description": "Wait node",
"downstreams": [
128796
],
"id": 128803,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128798
]
},
{
"description": "Update observer status",
"downstreams": [
128799
],
"id": 128804,
"name": "Update observer status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128800
]
},
{
"description": "Update zone status",
"downstreams": [
128797
],
"id": 128805,
"name": "Update zone status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
128799
]
}
]
},
"duration": 107,
"server": "xxx.xxx.xxx.xxx",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T10:29:04.907+08:00",
"traceId": "1551f7149ed5483b"
}