Skip to main content

Restore table row

Request

curl -vvv  "$API_HOST/open/api/v1/tablenodes/$table_id/rows/restore/" -H "Content-Type: application/json" -H "Authorization: $access-token"  -d '$request_body'

Request example

{
"rowIDs":["6457589faf1c21691b34dab4"]
}

Parameter description

NameTypeDescriptionRequired
rowIDsarrayresotred row idsY

Python example

def restore_table_rows(access_token, table_id,row_ids):
url = '%s/open/api/v1/tablenodes/%d/rows/restore/' % (API_HOST, table_id)
headers = {'Authorization': access_token}
data = {
"rowIDs": row_ids
}
req = requests.post(url, headers=headers, json=data)
return req.json()

Response

NameTypeDescription
detailobjectresotred row info
∟ idint64table id
∟ projectIDint64project id
∟ rowsarrayresotred row info
∟ viewRowsarrayview rows info

Response example

 {
"code": 0,
"detail": {
"id": 18,
"projectID": 2,
"rows": [
{
"cells": {
"6457589faf1c21691b34dab1": "a6e156727f8a311737aa2f475ea3da4e",
"6457589faf1c21691b34dab2": "九龄风度园"
},
"id": "6457589faf1c21691b34dab4",
"meta": {
"createTime": "2023-05-07T07:51:59.566Z",
"creatorID": 1,
"updateTime": "2023-05-07T07:51:59.566Z",
"updaterID": 1
},
"shareConfig": null
}
],
"viewRows": [
{
"id": "6457589faf1c21691b34dab4",
"order": 2,
"viewID": "64575895af1c21691b34dab0"
},
{
"id": "6457589faf1c21691b34dab4",
"order": 2.53125,
"viewID": "645f69d94444eb50dc9d63c3"
}
]
},
"extra": null,
"message": "OK",
"requestID": null
}