This topic describes how to start OceanBase Database Proxy (ODP) by using obshell.
Note
This API is supported starting with obshell V4.2.6.
API details
Constraints
- The obshell server performs security verification on this API. For more information, see API hybrid encryption.
- The ODP service must be managed by the obshell.
Request path
POST /api/v1/obproxy/start
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Indicates whether the request was successful. |
| timestamp | time.Time | The timestamp indicating when the server finishes the request. |
| duration | int | The time taken by the server to process the request, in milliseconds. |
| status | int | The HTTP status code that conforms to the HTTP status specification. |
| traceId | string | The Trace ID of the request. |
| data | DagDetailDTO | For more information, see the DagDetailDTO information data structure section below. |
| error | ApiError | The error generated by the request, which contains the following information:
|
The data structure of DagDetailDTO is as follows:
| Parameter | Type | Description |
|---|---|---|
| id | string | The general ID of the DAG. |
| dag_id | int | The DAG ID, which is the primary key stored in OceanBase Database. |
| name | string | The name of the DAG. |
| stage | int | The current execution stage of the DAG. |
| max_stage | int | The total number of stages in the DAG execution process. |
| state | string | The execution status of the DAG. |
| operator | string | The operation type of DAG execution. |
| start_time | time.Time | The start time of DAG execution. |
| end_time | time.Time | The end time of DAG execution. |
| additional_data | map[string]any | Other data of the DAG. |
| nodes | []NodeDetailDTO | The information of all nodes in the DAG. For more information, see Obtain the details of a node. |
Examples
Request example
POST 10.10.10.1:2886/api/v1/obproxy/start
Response example
{
"successful": true,
"timestamp": "2025-03-20T15:20:02.190100104+08:00",
"duration": 2,
"status": 200,
"traceId": "762914cd0eda6120",
"data": {
"id": "40194912107080888",
"dag_id": 8,
"name": "Start obproxy",
"stage": 1,
"max_stage": 2,
"state": "READY",
"operator": "RUN",
"start_time": "2025-03-20T15:20:02.188472711+08:00",
"end_time": "2025-03-20T15:20:02.188472711+08:00",
"additional_data": null,
"nodes": null
}
}
References
In addition to using the CLI to call the API, you can also use the SDK. For more information about how to request an API using obshell-sdk-python, see Start ODP.