insertRows

Overview

This endpoint can be used for streaming a small number of rows into a table at high frequency. For bulk uploading a large number of records, use the upload post / put interface.

HTTP Request

1
POST /api/v1/tables/:tableReference/uploads/:uploadReference/rows
Copied!

Path parameters

Parameter
Description
tableReference
A qualified reference to the table. See referencing resources for more information.
uploadReference
A qualified reference to the upload. Follows the form upload_name:id
This endpoint extends the general API structure

Request body

Provide a JSON object with information about the table.
Property name
Type
Description
rows
Array[Object]
Required. An array of rows, where each row is an object whose keys represent variable names and values represent that row's value for the given variable.
The length of the rows array cannot exceed 50,000, and less than 500 rows is recommended. The overall payload cannot exceed 10MB.
E.g.:
{ "name": "Jane", "age": 30 }
updateVariables
Boolean
Whether to update the variables associated with this upload if new variables are added or values are incompatible with the previous type. If false, an error will be thrown if any rows contain variables or values that would trigger a schema update.
Default: false

Authorization

Edit access to the dataset is required. Your access token must have the following scope:
  • data.edit

Response body

If successful, returns the following payload with a status code of 201.
1
{
2
"kind": "insertRowsResponse",
3
"rowsAdded": int,
4
"rowsSkipped": int,
5
"schemaUpdates": [
6
{
7
"updatedVariables": [{ "name": str, "type": str, "previousType" str }],
8
"addedVariables": [{ "name": str, "type": str }]
9
}
10
]
11
}
Copied!
Last modified 1mo ago