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

Insert/upsert rows

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/docs/{docId}/tables/{tableIdOrName}/rows
Rows
Inserts rows into a table, optionally updating existing rows if any upsert key columns are provided. This endpoint will always return a 202, so long as the doc and table exist and are accessible (and the update is structurally valid). Row inserts/upserts are generally processed within several seconds. Note: this endpoint only works for base tables, not views.
When upserting, if multiple rows match the specified key column(s), they will all be updated with the specified value.
请求示例请求示例
Python
Shell
JavaScript
Java
curl --location --request POST 'http://dev-cn.your-api-server.com/docs/AbCDeFGH/tables/grid-pqRst-U/rows' \
--header 'Content-Type: application/json' \
--data-raw '{
    "rows": [
        {
            "cells": [
                {
                    "value": "$12.34",
                    "column": "c-tuVwxYz"
                }
            ]
        }
    ],
    "keyColumns": [
        "c-bCdeFgh"
    ]
}'
响应示例响应示例
202 - 示例 1
{
    "requestId": "abc-123-def-456",
    "addedRowIds": [
        "i-bCdeFgh",
        "i-CdEfgHi"
    ]
}

请求参数

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 参数
disableParsing
boolean 
可选
If true, the API will not attempt to parse the data in any way.
示例值:
true
Body 参数application/json
Payload for upserting rows in a table.
rows
array[object (RowEdit) {1}] 
必需
cells
array[object (CellEdit) {2}] 
必需
keyColumns
array[string]
可选
Optional column IDs, URLs, or names (fragile and discouraged), specifying columns to be used as upsert keys.
示例值:
["c-bCdeFgh"]
示例

返回响应

🟢202A result indicating that the upsert was queued for processing.
application/json
Body
The result of a rows insert/upsert operation.
requestId
string 
必需
An arbitrary unique identifier for this request.
示例值:
abc-123-def-456
addedRowIds
array[string]
可选
Row IDs for rows that will be added. Only applicable when keyColumns is not set or empty.
示例值:
["i-bCdeFgh","i-CdEfgHi"]
🟠400400
🟠401401
🟠403403
🟠404404
🟠429429
修改于 2024-03-20 08:13:15
上一页
List table rows
下一页
Delete multiple rows
Built with