API details
Constraints
The obshell server performs security verification for this API. For details, see API hybrid encryption.
Request path
POST /api/v1/ob/init
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| import_script | bool | No | false | Controls whether to import time zone data and GIS meta data into the system tenant. The default value is false.
NoteThis parameter is supported starting with obshell V4.2.4.2. |
| create_proxyro_user | bool | No | false | Controls whether to create a proxyro user in the sys tenant and set the corresponding permissions. The default value is false.
NoteThis parameter is supported starting with obshell V4.2.6. |
| proxyro_password | string | No | ***** | Sets the proxyro user password.
NoteThis parameter is supported starting with obshell V4.2.6. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Indicates whether the request was successful. |
| timestamp | time.Time | The timestamp when the server finished processing the request. |
| duration | int | Time taken by the server to process the request (milliseconds). |
| status | int | HTTP status code that conforms to the HTTP status specification. |
| traceId | string | Trace ID of the request. |
| data | DagDetailDTO | For details, see DagDetailDTO data structure below. |
| error | ApiError | Error details, including:
|
The DagDetailDTO data structure is as follows:
| Parameter | Type | Description |
|---|---|---|
| id | string | General DAG ID. |
| dag_id | int | DAG ID, which is the primary key recorded in the OceanBase database. |
| name | string | DAG name. |
| stage | int | Current execution stage of the DAG. |
| max_stage | int | Total number of stages in the DAG execution process. |
| state | string | Execution status of the DAG. |
| operator | string | Operation type of the DAG execution. |
| start_time | time.Time | Start time of the DAG execution. |
| end_time | time.Time | End time of the DAG execution. |
| additional_data | map[string]any | Other DAG data. |
| nodes | []NodeDetailDTO | All node information in the DAG. For details, see Get node details. |
Examples
Request example
POST 10.10.10.1:2886/api/v1/ob/init
Response example
{
"successful": true,
"timestamp": "2024-01-09T16:38:29.712344717+08:00",
"duration": 4,
"status": 200,
"traceId": "4f0fd04e3befd3bd",
"data": {
"id": "22130706433028869",
"dag_id": 4,
"name": "Initialize cluster",
"stage": 1,
"max_stage": 10,
"state": "READY",
"operator": "RUN",
"start_time": "2024-01-09T16:38:29.708290486+08:00",
"end_time": "2024-01-09T16:38:29.708290486+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 details about requesting the API using obshell-sdk-python, see Initialize cluster.
- For details about requesting the API using obshell-sdk-go, see Initialize cluster.