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),```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"
}
curl -s -H 'Authorization: Bearer <your API token>' \
-G --data-urlencode 'query=<column ID>:"Work out"' \
'https://coda.io/apis/v1/docs/<doc ID>/tables/<table ID>/rows' |
jq '"Matching rows: " + (.items | length | tostring)'
# => "Matching rows: 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"
}