Using the API directly is not recommended for most users. Instead, we recommend using the Python SDK.
Usage Notes
- Currently, only parquet files are supported. Snappy compression is supported.
- You can only upload one file at a time via the API. You must make multiple requests to upload multiple files. The Python SDK supports uploading multiple files at once.
- All files must have the same schema. Files with schemas that do not match will be rejected.
- Names must be unique. If you upload a file with a name that already exists in the dataset, it will be rejected.
- When you upload to a dataset, the ordering will be preserved. If you upload multiple files to a dataset, they will be added to the dataset in the order you provide them.
Request Body
The ID of the dataset to upload the file to
The file to upload (must be a parquet file)
Headers
Your Sutro API key using Key authentication scheme.Format:
Key YOUR_API_KEY
Example: Authorization: Key sk_live_abc123...
Response
Returns the file ID of the uploaded file.The unique identifier for the uploaded file
Code Examples
Important Considerations
- File Format: Only parquet files are currently supported
- Schema Consistency: All files in a dataset must share the same schema
- Unique Names: File names must be unique within each dataset
- Ordering: Files are processed in the order they are uploaded
- Compression: Snappy compression is supported for parquet files
- Single File Limit: API supports one file per request (use Python SDK for batch uploads)