更新单元格附件
请求
curl -vvv -X PATCH "$API_HOST/open/api/v1/tablenodes/$table_id/rows/$row_id/cells/$column_id/attachments/$attchment_id/" -H "Content-Type: application/json" -H "Authorization: $access-token" -d '$request_body'
请求体示例
{
"name":"newName.csv"
}
参数说明
Name | Type | Description | Required |
---|---|---|---|
name | string | attachment name | Y |
Python 示例
def update_attachment(access_token, table_id, row_id, column_id, attachment_id, name):
url = '%s/open/api/v1/tablenodes/%d/rows/%s/cells/%s/attachments/%s/' %( API_HOST, table_id, row_id,column_id,attachment_id)
data = {
"name": name
}
headers = {'Authorization': access_token}
req = requests.patch(url, headers=headers, json=data)
return req.json()
响应
Name | Type | Description |
---|---|---|
detail | object | attachment info |
∟ attachments | array | attachment array |
∟ columnID | string | column id |
∟ fileID | string | file id |
∟ name | string | attachment name |
∟ projectID | int64 | project id |
∟ rowID | string | row id |
∟ tableNodeID | int64 | table id |
响应示例
{
"code": 0,
"detail": {
"attachments": null,
"columnID": "645f6d304444eb50dc9d63c6",
"fileID": "clatxt69zta8",
"name": "newName.csv",
"projectID": 2,
"rowID": "6457589faf1c21691b34dab3",
"tableNodeID": 40
},
"extra": null,
"message": "OK",
"requestID": null
}