恢复数据表列
请求
curl -vvv -X POST "$API_HOST/open/api/v1/tablenodes/$table_id/columns/restore/" -H "Authorization: $access-token" -d '$request_body'
请求体
{
"columnIDs": [
"645f545d4444eb50dc9d63b6"
]
}
参数说明
Name | Type | Description | Required |
---|---|---|---|
columnIDs | array | column ids | Y |
Python 示例
def restore_table_column(access_token, table_id, column_ids):
url = '%s/open/api/v1/tablenodes/%d/columns/restore/' % (API_HOST, table_id)
headers = {'Authorization': access_token}
data = {
"columnIDs": column_ids,
}
req = requests.post(url, headers=headers, json=data)
return req.json()
响应
Name | Type | Description |
---|---|---|
detail | object | restored column info |
∟ addedColumns | array | added columns |
∟ addedViewColumns | array | added view columns |
∟ tableNodeID | int64 | table id |
∟ updatedCells | object | updated cells info |
响应示例
{
"code": 0,
"detail": {
"addedColumns": [
{
"desc": null,
"id": "645f545d4444eb50dc9d63b6",
"isPrimary": false,
"meta": {
"createTime": "0001-01-01T00:00:00Z",
"creatorID": 0,
"updateTime": "0001-01-01T00:00:00Z",
"updaterID": 0
},
"mode": "",
"name": "新字段5",
"type": "multiLineText",
"typeOptions": null
}
],
"addedViewColumns": [
{
"desc": null,
"id": "645f545d4444eb50dc9d63b6",
"order": 8,
"required": false,
"statsOption": null,
"title": null,
"viewID": "645d87141694c57ce7af57c0",
"width": 200
},
{
"desc": null,
"id": "645f545d4444eb50dc9d63b6",
"order": 5.5,
"required": false,
"statsOption": null,
"title": null,
"viewID": "645f3d0e4444eb50dc9d63af",
"width": 200
}
],
"tableNodeID": 73,
"updatedCells": {
"645d87151694c57ce7af57c7": {},
"645d87151694c57ce7af57c8": {},
"645d87151694c57ce7af57c9": {},
"645d87151694c57ce7af57ca": {},
"645d87151694c57ce7af57cb": {},
"645d87151694c57ce7af57cc": {},
"645d87151694c57ce7af57cd": {},
"645d87151694c57ce7af57ce": {},
"645d87151694c57ce7af57cf": {},
"645d87151694c57ce7af57d0": {},
"645f593b4444eb50dc9d63b9": {}
}
},
"extra": null,
"message": "OK",
"requestID": null
}