Uploads

Replace an upload's data

Changed on

Replace the data behind an existing CSV upload while keeping its id stable. The new file lands as fresh storage; when the connection stages uploads, an upload that keeps its warehouse table for life (one with a key, or any upload where tables are kept) takes the rows into that same table, and any other lands in a fresh table. The upload's pointers move to the new data — views and document tabs reference the upload by id, so they serve it with no model or document changes. Columns already in the upload keep their saved type and date format, and new columns are detected from the file; a value that doesn't fit its column's saved type fails the request, naming the row. To change a column's type, delete the upload and create it again, which gives it a new id. Column renames/removals may break content referencing the old columns.

put/api/v1/uploads/{uploadId}

Request

  • Base URL
    https://omniapp.co (the document declares no server; this is the origin it was published from)
  • URL
    https://omniapp.co/api/v1/uploads/{uploadId}
  • Auth
    HTTP bearer

Path parameters

uploadIdstring uuid required

ID of the upload to delete

Request body multipart/form-data

filestring binary required

The replacement CSV file. Fully replaces the existing data; existing columns keep their saved type and date format. Column renames/removals may break content referencing the old columns.

Response

Upload data replaced successfully

fileNamestring required

File name of the replacement upload

idstring uuid required

The upload id — unchanged by the data swap

inDbAsTableNamestring required

Database table name in the scratch schema (empty for S3-only connections)

refreshedModelIdsstring[] required

Models whose view of this upload was re-pointed at the new data (the upload's workbook model, or the connection's shared models holding a view backed by this upload)

rowCountinteger required

Number of rows in the replacement file

truncatedboolean required

Whether the file was truncated due to row limit

viewNamestring required

View name — unchanged by the data swap

Example response

{
  "fileName": "users_updated.csv"
}

Changes