Uploads

Upload a CSV file

<Note> To use this endpoint:
  • The Upload data setting in Settings > Content permissions must enabled by an Organization Admin
  • The authenticating user must have Restricted Querier permissions or higher on the model the file will be uploaded to </Note>

Upload a CSV file to create a new data input table. The file is parsed, converted to Arrow format, uploaded to storage, written to the connection's table upload (scratch) schema, and a view is created in the specified model.

Uploaded files:

  • Must be a CSV file with .csv extension
  • Can have a maximum of 500,000 rows. Files will be truncated if this limit is exceeded.

The returned id can be passed as fileUploadId on a csv or spreadsheet queryPresentation tab via the Documents v2 draft-patch endpoints to bind the upload as a document Source tab.

post/v1/uploads

Request

  • Base URL
    https://blobsrus.omniapp.co/api
  • URL
    https://blobsrus.omniapp.co/api/v1/uploads
  • Auth
    HTTP bearer

Request body multipart/form-data

filestring binary required

The CSV file to upload, which must have a .csv extension

modelIdstring uuid required

UUID of the model to create the view in

branchIdstring uuid

UUID of the branch to create the view in. Mutually exclusive with branchName.

branchNamestring

Name of the branch to create the view in. Mutually exclusive with branchId.

viewNamestring

Override the view name. Defaults to sanitized file name, suffixed with _2, _3, and so on if the model already has a view by that name.

Example request

{
  "modelId": "880e8400-e29b-41d4-a716-446655440003",
  "branchId": "990e8400-e29b-41d4-a716-446655440004",
  "branchName": "my-branch",
  "viewName": "custom_view_name"
}

Response

CSV file uploaded successfully and view created.

idstring uuid

Unique identifier for the upload

fileNamestring

Original file name

viewNamestring

Name of the view created. May differ from the requested or derived name if that name was already taken.

modelIdstring uuid

ID of the model the view was created in

inDbAsTableNamestring

Database table name in the scratch schema

rowCountinteger

Number of rows in the uploaded file

truncatedboolean

Whether the file was truncated due to row limit (500,000 rows)

viewCreatedboolean

Whether a view was created in the model

Changes

No recorded changes to this operation across all 2 revisions of this API.