blob: 2eb50ea4b84b3401122e3fe377ca1421264b907c [file] [log] [blame] [view]
---
title: Mdq Table Interface
sidebar_position: 21
---
** MdqTableRestfulApi class **
## Activate table operations
**Interface address**:`/api/rest_j/v1/datasource/active`
**Request method**: `GET`
**Request data type**: `application/x-www-form-urlencoded`
**Response data type**: `*/*`
**Interface description**:<p>Activate table operation</p>
**Request Parameters**:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|tableId|Table ID|query|false|string||
**Response Status**:
| Status code | Description | schema |
| -------- | -------- | ----- |
|200|OK|Message|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**Response parameters**:
| parameter name | parameter description | type | schema |
| -------- | -------- | ----- |----- |
|data|Dataset|object||
|message|Description|string||
|method|request url|string||
|status|Status|integer(int32)|integer(int32)|
**Sample Response**:
````javascript
{
"data": {},
"message": "",
"method": "",
"status": 0
}
````
## Generate the DDL statement for the new library table
**Interface address**:`/api/rest_j/v1/datasource/displaysql`
**Request method**: `POST`
**Request data type**: `application/json`
**Response data type**: `*/*`
**Interface description**:<p>Generate DDL statement for new library table</p>
**Request Parameters**:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|table|Table||false|String|String|
**Response Status**:
| Status code | Description | schema |
| -------- | -------- | ----- |
|200|OK|Message|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**Response parameters**:
| parameter name | parameter description | type | schema |
| -------- | -------- | ----- |----- |
|data|Dataset|object||
|message|Description|string||
|method|request url|string||
|status|Status|integer(int32)|integer(int32)|
**Sample Response**:
````javascript
{
"data": {},
"message": "",
"method": "",
"status": 0
}
````
## Get partition statistics
**Interface address**:`/api/rest_j/v1/datasource/getPartitionStatisticInfo`
**Request method**: `GET`
**Request data type**: `application/x-www-form-urlencoded`
**Response data type**: `*/*`
**Interface description**:<p>Get partition statistics</p>
**Request Parameters**:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|database|Datasource|query|false|string||
|partitionSort|Partition Sort||false|String|String|
|tableName|table name|query|false|string||
|partitionPath|partitionPath|query|false|string||
**Response Status**:
| Status code | Description | schema |
| -------- | -------- | ----- |
|200|OK|Message|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**Response parameters**:
| parameter name | parameter description | type | schema |
| -------- | -------- | ----- |----- |
|data|Dataset|object||
|message|Description|string||
|method|request url|string||
|status|Status|integer(int32)|integer(int32)|
**Sample Response**:
````javascript
{
"data": {},
"message": "",
"method": "",
"status": 0
}
````
## Get table information
**Interface address**:`/api/rest_j/v1/datasource/getTableBaseInfo`
**Request method**: `GET`
**Request data type**: `application/x-www-form-urlencoded`
**Response data type**: `*/*`
**Interface description**:<p>Get table information</p>
**Request Parameters**:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|database|Datasource|query|false|string||
|tableName|table name|query|false|string||
**Response Status**:
| Status code | Description | schema |
| -------- | -------- | ----- |
|200|OK|Message|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**Response parameters**:
| parameter name | parameter description | type | schema |
| -------- | -------- | ----- |----- |
|data|Dataset|object||
|message|Description|string||
|method|request url|string||
|status|Status|integer(int32)|integer(int32)|
**Sample Response**:
````javascript
{
"data": {},
"message": "",
"method": "",
"status": 0
}
````
## Get table field information
**Interface address**:`/api/rest_j/v1/datasource/getTableFieldsInfo`
**Request method**: `GET`
**Request data type**: `application/x-www-form-urlencoded`
**Response data type**: `*/*`
**Interface description**:<p>Get table field information</p>
**Request Parameters**:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|database|Datasource|query|false|string||
|tableName|table name|query|false|string||
**Response Status**:
| Status code | Description | schema |
| -------- | -------- | ----- |
|200|OK|Message|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**Response parameters**:
| parameter name | parameter description | type | schema |
| -------- | -------- | ----- |----- |
|data|Dataset|object||
|message|Description|string||
|method|request url|string||
|status|Status|integer(int32)|integer(int32)|
**Sample Response**:
````javascript
{
"data": {},
"message": "",
"method": "",
"status": 0
}
````
## Get table statistics
**Interface address**:`/api/rest_j/v1/datasource/getTableStatisticInfo`
**Request method**: `GET`
**Request data type**: `application/x-www-form-urlencoded`
**Response data type**: `*/*`
**Interface description**:<p>Get table statistics</p>
**Request Parameters**:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|database|Datasource|query|false|string||
|pageNow|page number|query|false|string||
|pageSize|page size|query|false|string||
|partitionSort|Partition Sort|query|false|string||
|tableName|table name|query|false|string||
**Response Status**:
| Status code | Description | schema |
| -------- | -------- | ----- |
|200|OK|Message|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**Response parameters**:
| parameter name | parameter description | type | schema |
| -------- | -------- | ----- |----- |
|data|Dataset|object||
|message|Description|string||
|method|request url|string||
|status|Status|integer(int32)|integer(int32)|
**Sample Response**:
````javascript
{
"data": {},
"message": "",
"method": "",
"status": 0
}
````
## Active ID
**Interface address**:`/api/rest_j/v1/datasource/persistTable`
**Request method**: `POST`
**Request data type**: `application/json`
**Response data type**: `*/*`
**Interface description**:<p>Activated logo</p>
**Request Parameters**:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|table|Table||false|String|String|
**Response Status**:
| Status code | Description | schema |
| -------- | -------- | ----- |
|200|OK|Message|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**Response parameters**:
| parameter name | parameter description | type | schema |
| -------- | -------- | ----- |----- |
|data|Dataset|object||
|message|Description|string||
|method|request url|string||
|status|Status|integer(int32)|integer(int32)|
**Sample Response**:
````javascript
{
"data": {},
"message": "",
"method": "",
"status": 0
}
````