List table rows
开发环境
开发环境
GET
/docs/{docId}/tables/{tableIdOrName}/rows
Rows
Value results
valueFormat
parameter dictates in what format the API should return values for individual cells.simple
(default): Returns cell values as the following JSON values: string
, number
, or boolean
. Array values (like multiselects) are returned as comma-delimited strings.simpleWithArrays
: Singleton values are returned as simple
. Array values are returned as JSON arrays and the values within are simple
values (including nested arrays).rich
: If applicable, returns many values with further encoding, allowing API users to have lossless access to data in Coda.text
values, returns data in Markdown syntax. If the text field is simple text (e.g. has no formatting),the field will be fully escaped with triple-ticks. E.g
```This is plain text```
currency
, lookup
, image
, person
and hyperlink
values, the value will be encoded in JSON-LD format. // Currency
{
"@context": "http://schema.org",
"@type": "MonetaryAmount",
"currency": "USD",
"amount": 42.42
}
// Lookup
{
"@context": "http://schema.org",
"@type": "StructuredValue",
"additionalType": "row",
"name": "Row Name",
"rowId": "i-123456789",
"tableId": "grid-123456789",
"tableUrl": "https://coda.io/d/_d123456789/grid-123456789",
"url": "https://coda.io/d/_d123456789/grid-123456789#_r42",
}
// Hyperlink
{
"@context": "http://schema.org",
"@type": "WebPage",
"name": "Coda",
"url": "https://coda.io"
}
// Image
{
"@context": "http://schema.org",
"@type": "ImageObject",
"name": "Coda logo",
"url": "https://coda.io/logo.jpg"
}
// People
{
"@context": "http://schema.org",
"@type": "Person",
"name": "Art Vandalay",
"email": "art@vandalayindustries.com"
}
请求示例请求示例
Python
Shell
JavaScript
Java
curl --location --request GET 'http://dev-cn.your-api-server.com/docs/AbCDeFGH/tables/grid-pqRst-U/rows'
响应示例响应示例
200 - 示例 1
{
"nextPageToken": "eyJsaW1pd",
"nextSyncToken": "eyJsaW1pd",
"items": [
{
"id": "i-tuVwxYz",
"href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows/i-RstUv-W",
"name": "Apple",
"index": 7,
"browserLink": "https://coda.io/d/_dAbCDeFGH#Teams-and-Tasks_tpqRst-U/_rui-tuVwxYz",
"createdAt": "2018-04-11T00:18:57.946Z",
"updatedAt": "2018-04-11T00:18:57.946Z",
"type": "row",
"values": {
"c-tuVwxYz": "Apple",
"c-bCdeFgh": [
"$12.34",
"$56.78"
]
}
}
],
"href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows?limit=20",
"nextPageLink": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows?pageToken=eyJsaW1pd"
}
请求参数
Path 参数
docId
string
必需
示例值:
AbCDeFGH
tableIdOrName
string
必需
示例值:
grid-pqRst-U
Query 参数
query
string
可选
<column_id_or_name>:<value>
. If you'd like to use a column name instead of an ID, you must quote it (e.g., "My Column":123
). Also note that value
is a JSON value; if you'd like to use a string, you must surround it in quotes (e.g., "groceries"
).示例值:
c-tuVwxYz:"Apple"
sortBy
enum<string>
可选
枚举值:
createdAtnaturalupdatedAt
useColumnNames
boolean
可选
示例值:
true
valueFormat
enum<string>
可选
枚举值:
simplesimpleWithArraysrich
visibleOnly
boolean
可选
示例值:
true
limit
integer
可选
>= 1
默认值:
25
示例值:
10
pageToken
string
可选
示例值:
eyJsaW1pd
syncToken
string
可选
示例值:
eyJsaW1pd
返回响应
修改于 2024-03-20 08:13:15