This will increment the dataset's version, but not do any data scale processing
A POST to this endpoint allows you to create, update, or delete records in a specified dataset.
- A CREATE action overwrites an existing record or creates a new one.
- A DELETE action removes the record from the dataset.
The POST body of the request contains newline-delimited JSON documents, one document per update command, as in the following example:
{"action": "CREATE","recordId": "101","record": {"name":"John","email":["[email protected]","[email protected]"]}}
{"action": "CREATE","recordId": "102","record": {"name":"Jane","email":["[email protected]","[email protected]"]}}
{"action": "DELETE","recordId": "102"}
The POST body contains newline-delimited JSON documents. Using newline-delimited JSON documents is not required, since the API uses the JSON document-end
to delimit the stream.
However, exporting dataset's records as JSON requires that each line is newline-delimitated. For more information, see Stream the contents of a dataset as JSON records.
The fields in each request object are as follows:
Field | Description |
---|---|
action | The action requested. |
recordId | The ID of the record, which is the content of the primary key attribute in the dataset. |
record | Optional. The key: value pair with the information for the new record to contain on creation or update. |
A successful request returns a JSON object with metadata describing the action.
Key | Value Description |
---|---|
numCommandsProcessed | The number of commands successfully processed. |
allCommandsSucceeded | Boolean. Whether all the commands succeeded. |
validationErrors | A list of any validation errors returned for failed commands. Only provided if allCommandSucceeded is false. |