ByteChef LogoByteChef
OpenapiRows

Batch insert or upsert rows

Insert or upsert up to 1000 rows in one transaction; one failure rolls back all of them. Under UPSERT every row must carry an externalId.

POST
/workspaces/{workspaceId}/data-tables/{name}/rows/batch

Path Parameters

workspaceId*integer

The id of a workspace.

Formatint64
name*string

The table name.

Header Parameters

X-Environment?string

The environment whose physical table is addressed. PRODUCTION when omitted.

Value in

  • "DEVELOPMENT"
  • "STAGING"
  • "PRODUCTION"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/workspaces/0/data-tables/string/rows/batch" \  -H "Content-Type: application/json" \  -d '{    "rows": [      {        "values": {}      }    ]  }'
{  "rows": [    {      "id": 0,      "externalId": "string",      "values": {}    }  ]}

How is this guide?