List table columns
Request
curl -vvv "$API_HOST/open/api/v1/tablenodes/$table_id/columns/" -H "Authorization: $access-token"
Python example
def list_table_columns(access_token, table_id):
url = '%s/open/api/v1/tablenodes/%d/columns/' % (API_HOST, table_id)
headers = {'Authorization': access_token}
req = requests.get(url, headers=headers)
return req.json()
Response
Name | Type | Description |
---|---|---|
detail | array | columns info |
∟ id | string | column id |
∟ name | string | column name |
∟ type | string | column type |
∟ typeOptions | object | column type options |
∟ isPrimary | bool | is primary column |
∟ mode | string | column mode |
∟ desc | string | description |
∟ meta | object | column meta info |
Response example
{
"code": 0,
"detail": [
{
"id": "645d87151694c57ce7af57c3",
"name": "坐标",
"type": "coordinate",
"typeOptions": null,
"isPrimary": false,
"mode": "normal",
"desc": null,
"meta": {
"createTime": "0001-01-01T00:00:00Z",
"updateTime": "0001-01-01T00:00:00Z",
"creatorID": 0,
"updaterID": 0
}
},
{
"id": "645d87151694c57ce7af57c2",
"name": "日期",
"type": "datetime",
"typeOptions": {
"dateFormat": "year/month/day",
"quantiles": null,
"timeFormat": "hidden"
},
"isPrimary": false,
"mode": "normal",
"desc": null,
"meta": {
"createTime": "0001-01-01T00:00:00Z",
"updateTime": "0001-01-01T00:00:00Z",
"creatorID": 0,
"updaterID": 0
}
},
{
"id": "645d87151694c57ce7af57c5",
"name": "数值",
"type": "number",
"typeOptions": {
"format": "number",
"precision": 2,
"quantiles": null
},
"isPrimary": false,
"mode": "normal",
"desc": null,
"meta": {
"createTime": "0001-01-01T00:00:00Z",
"updateTime": "0001-01-01T00:00:00Z",
"creatorID": 0,
"updaterID": 0
}
},
{
"id": "645d87151694c57ce7af57c6",
"name": "附件",
"type": "attachment",
"typeOptions": null,
"isPrimary": false,
"mode": "normal",
"desc": null,
"meta": {
"createTime": "0001-01-01T00:00:00Z",
"updateTime": "0001-01-01T00:00:00Z",
"creatorID": 0,
"updaterID": 0
}
},
{
"id": "645d87151694c57ce7af57c1",
"name": "标题",
"type": "multiLineText",
"typeOptions": null,
"isPrimary": true,
"mode": "normal",
"desc": null,
"meta": {
"createTime": "0001-01-01T00:00:00Z",
"updateTime": "0001-01-01T00:00:00Z",
"creatorID": 0,
"updaterID": 0
}
},
{
"id": "645d87151694c57ce7af57c4",
"name": "单选",
"type": "singleChoice",
"typeOptions": {
"choices": []
},
"isPrimary": false,
"mode": "normal",
"desc": null,
"meta": {
"createTime": "0001-01-01T00:00:00Z",
"updateTime": "0001-01-01T00:00:00Z",
"creatorID": 0,
"updaterID": 0
}
}
],
"extra": null,
"message": "OK",
"requestID": null
}