post
Overview
The upload resource is used for adding data content to a table. You may only create uploads on tables that belong to unreleased versions. You may create one or more uploads for per table, and their records will be "stacked" based on common variable names across the uploads.
There are multiple different mechanisms to upload content through this endpoint. In general, if your file is larger than 100MB, or if you are on an unreliable internet connection, it is recommended to use resumable uploads. If you are utilizing a Redivis client library to perform your uploads, this will be taken care of for you.
There's a lot of complexity in uploading data! It's highly recommended to use one of the client libraries to transfer data to Redivis. These libraries take care of the complexities automatically and optimize the upload mechanism based on the size of your file.
Simple uploads
Simple uploads should be used for smaller files that follow standard conventions. Provide the upload metadata through query parameters, and the file's content in the request body. The total payload cannot exceed 100MB.
Multipart uploads
If a file is still small, but you need to provide additional metadata, you may send a multipart request body. The first part must be JSON-encoded and contain the upload's metadata, and the second part should contain the file's content.
If sending a multipart request, the appropriate Content-Type: multipart/form-data
header must be set. The total payload of multipart uploads cannot exceed 100MB.
Resumable uploads
For larger files or less reliable network connection, it is recommended to use resumable uploads for better fault tolerance. To perform a resumable upload, first create a temporary resumable upload and upload your file's content to the provided URL. After the upload is completed, call this endpoint with the resumableUploadId
provided in the request body, setting the header Content-Type: application/json
.
Streaming uploads
If you have a small number of rows being inserted at relatively high frequency, you should first create an empty upload via this endpoint (providing type="stream"
in the request body), and then utilize the upload.insertRows endpoint to stream individual rows into the upload.
Transfer uploads
If the file currently resides in another location, such as an s3 bucket or url, or as a table or file on Redivis, you can specify a transferSpecification
in the request body. Note that you must first enable the relevant data source in your workspace -> settings before you can perform a transfer upload from that source.
HTTP Request
This endpoint extends the general API structure
Path parameters
Query parameters
Request body
If you are performing a simple upload, provide the upload's data in the request body.
If you are performing a multipart upload, the first part must contain the JSON-encoded parameters specified below, and the second part must contain the upload's data.
If you are performing a resumable upload, provide the resumableUploadId
and the upload's parameters as a JSON-encoded body as specified below.
If you are performing a streaming upload, provide the upload's parameters as a JSON-encoded body as specified below. The upload type must be set to stream
.
Authorization
Edit access to the dataset is required. Your access token must have the following scope:
data.edit
Learn more about authorization.
Response body
If successful, returns a JSON representation of an upload resource.
Last updated