Coda
  1. Rows
Coda
  • Permissions
    • Get sharing metadata
      GET
    • Delete permission
      DELETE
    • Search principals
      GET
    • Get ACL settings
      GET
    • Update ACL settings
      PATCH
    • List permissions
      GET
    • Add permission
      POST
  • Pages
    • Content export status
      GET
    • List pages
      GET
    • Create a page
      POST
    • Begin content export
      POST
    • Get a page
      GET
    • Delete a page
      DELETE
    • Update a page
      PUT
  • Tables
    • List tables
      GET
    • Get a table
      GET
  • Columns
    • List columns
      GET
    • Get a column
      GET
  • Rows
    • Push a button
      POST
    • List table rows
      GET
    • Insert/upsert rows
      POST
    • Delete multiple rows
      DELETE
    • Get a row
      GET
    • Delete row
      DELETE
    • Update row
      PUT
  • Formulas
    • List formulas
    • Get a formula
  • Controls
    • List controls
    • Get a control
  • CustomDocDomains
    • List custom doc domains
    • Add custom domain
    • Deletes a custom domain
    • Updates a custom domain
    • Gets custom doc domains providers
  • Miscellaneous
    • Resolve browser link
    • Get mutation status
  • Automations
    • Trigger automation
  • Analytics
    • List doc analytics
    • List page analytics
    • Get doc analytics summary
    • List Pack analytics
    • Get Pack analytics summary
    • Get analytics last updated day
    • List Pack formula analytics
  • Workspaces
    • List workspace users
    • List workspace roles
    • Updates user role
  • Packs
    • List Packs
    • Create Pack
    • Gets the JSON Schema for Pack configuration.
    • List the versions for a Pack.
    • Get the next valid version for a Pack.
    • Get the difference between two pack versions.
    • Register Pack version
    • Pack version upload complete
    • Create a new Pack release.
    • List the releases for a Pack.
    • Update an existing Pack release.
    • Set the OAuth configurations of the Pack.
    • Retrieve the OAuth configuration of the Pack.
    • List permissions for a Pack
    • Add a permission for Pack
    • Delete a permission for Pack
    • List makers for Pack
    • Add a maker for Pack
    • Delete a maker for Pack
    • List categories for Pack
    • Add a category for Pack
    • Delete a category for Pack
    • Upload a Pack asset.
    • Upload Pack source code.
    • Pack asset upload complete
    • Pack source code upload complete
    • get the source code for a Pack version.
    • List the Pack listings accessible to a user.
    • Get detailed listing information for a Pack.
    • List featured docs for a Pack
    • Update featured docs for a Pack
    • Get a single Pack
    • Update Pack
    • Delete Pack
    • Set the system connection credentials of the Pack.
    • Patch the system connection credentials of the Pack.
    • Retrieve the system connection metadata of the Pack.
    • Retrieve the logs of a Pack.
    • Retrieve the grouped logs of a Pack.
  • Publishing
    • Get doc categories
    • Unpublish doc
    • Publish doc
  • Docs
    • Get info about a doc
    • Delete doc
    • Update doc
    • Create doc
    • List available docs
  • Account
    • Get user info
  1. Rows

List table rows

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
GET
/docs/{docId}/tables/{tableIdOrName}/rows
Rows
Returns a list of rows in a table.

Value results#

The 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.
For 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```
For 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 
必需
ID of the doc.
示例值:
AbCDeFGH
tableIdOrName
string 
必需
ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it.
示例值:
grid-pqRst-U
Query 参数
query
string 
可选
Query used to filter returned rows, specified as <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> 
可选
Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending. "UpdatedAt" sort ordering is the order of rows based upon when they were last updated. This does not include updates to calculated values. "Natural" sort ordering is the order that the rows appear in the table view in the application. This ordering is only meaningfully defined for rows that are visible (unfiltered). Because of this, using this sort order will imply visibleOnly=true, that is, to only return visible rows. If you pass sortBy=natural and visibleOnly=false explicitly, this will result in a Bad Request error as this condition cannot be satisfied.
枚举值:
createdAtnaturalupdatedAt
useColumnNames
boolean 
可选
Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors.
示例值:
true
valueFormat
enum<string> 
可选
The format that cell values are returned as.
枚举值:
simplesimpleWithArraysrich
visibleOnly
boolean 
可选
If true, returns only visible rows and columns for the table.
示例值:
true
limit
integer 
可选
Maximum number of results to return in this query.
>= 1
默认值:
25
示例值:
10
pageToken
string 
可选
An opaque token used to fetch the next page of results.
示例值:
eyJsaW1pd
syncToken
string 
可选
An opaque token returned from a previous call that can be used to return results that are relevant to the query since the call where the syncToken was generated.
示例值:
eyJsaW1pd

返回响应

🟢200List of rows in the table.
application/json
Body
List of rows.
nextPageToken
string 
可选
If specified, an opaque token used to fetch the next page of results.
示例值:
eyJsaW1pd
nextSyncToken
string 
可选
If specified, an opaque token that can be passed back later to retrieve new results that match the parameters specified when the sync token was created.
示例值:
eyJsaW1pd
items
array[object (Row) {9}] 
必需
id
string 
必需
ID of the row.
示例值:
i-tuVwxYz
href
string <url>
必需
API link to the row.
示例值:
https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows/i-RstUv-W
name
string 
必需
The display name of the row, based on its identifying column.
示例值:
Apple
index
integer 
必需
Index of the row within the table.
示例值:
7
browserLink
string <url>
必需
Browser-friendly link to the row.
示例值:
https://coda.io/d/_dAbCDeFGH#Teams-and-Tasks_tpqRst-U/_rui-tuVwxYz
createdAt
string <date-time>
必需
Timestamp for when the row was created.
示例值:
2018-04-11T00:18:57.946Z
updatedAt
string <date-time>
必需
Timestamp for when the row was last modified.
示例值:
2018-04-11T00:18:57.946Z
type
enum<string> 
必需
The type of this resource.
枚举值:
row
values
object 
必需
Values for a specific row, represented as a hash of column IDs (or names with useColumnNames) to values.
示例值:
{"c-tuVwxYz":"Apple","c-bCdeFgh":["$12.34","$56.78"]}
href
string <url>
可选
API link to these results
示例值:
https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows?limit=20
nextPageLink
string <url>
可选
If specified, a link that can be used to fetch the next page of results.
示例值:
https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows?pageToken=eyJsaW1pd
🟠400400
🟠401401
🟠403403
🟠404404
🟠429429
修改于 2024-03-20 08:13:15
上一页
Push a button
下一页
Insert/upsert rows
Built with