Generate database upload URL
Generate a pre-signed URL for uploading files to a database.
Creates a temporary upload URL that allows direct file uploads to cloud storage without routing data through the API server. The URL expires after 1 hour.
This is the first step in the multi-step upload workflow:
- Generate upload URL (this endpoint)
- Upload file directly to cloud storage using the URL
- Preview uploaded file (optional)
- Complete upload and process file
Use Cases:
- Upload CSV files for data import
- Upload large datasets efficiently
- Batch data ingestion
Security:
- URL expires after 1 hour
- File is uploaded to user-specific path
- Metadata includes database ID for tracking
Authorizations
API key authentication. Include your API key in the X-API-Key header as: X-API-Key YOUR_API_KEY
Example:
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Path Parameters
Query Parameters
Response
Pre-signed upload URL generated successfully
Response containing pre-signed upload URL for file uploads.
Generated by POST /database/{db_id}/upload-url endpoint. Use this URL to upload files directly to cloud storage.
Unique key identifying the file location in storage. Use this key to reference the file in subsequent operations.
"databases/123e4567-e89b-12d3-a456-426614174000/documents/file-uuid.csv"
Pre-signed URL for uploading file to cloud storage. Upload your file to this URL using PUT or POST request.
"https://storage.googleapis.com/bucket/path/file.csv?signature=abc123&expires=1640000000"
UTC timestamp when the upload URL expires. Complete the upload before this time. Typically 1 hour from generation.
"2024-01-15T11:30:00Z"