Skip to main content

Trash completely deletes table

Delete table from trash

Request

curl -vvv -X DELETE "$API_HOST/open/api/v1/tablenodes/recycle/$table_id/" -H "Authorization: $access-token"

Python example

def recycle_delete(access_token, table_id):
headers = {'Authorization': access_token}

url = '%s/open/api/v1/tablenodes/recycle/%d/' % (API_HOST, table_id)
response = requests.delete(url, headers=headers)

return response.json()

# create table using csv
data = {
'projectID': project['id'],
'name': 'test-csv-upload',
'skipFirstRow': True
}
resp = ma.create_table(access_token, data,
'data/create_table_columns.json',
'data/gd.csv')
table = resp['detail']

resp = ma.table_delete(access_token, table['id'])
resp = ma.table_undelete(access_token, table['id'])
resp = ma.table_delete(access_token, table['id'])
resp = ma.recycle_delete(access_token, table['id'])

Response

Response body example

{
"code": 0,
"detail": {
"projectID": 264,
"ids": [
981
],
"layerNodeIDs":null,
"recycleTableNode": {
"id": 981,
"name": "test",
"type": "table",
"subscribed":false,
"deletedAt": "2022-04-15T08:06:59.172521Z",
"timeRemaining": 9223372036
}
},
"extra":null,
"message": "OK",
"requestID":null
}