Upload a big file straight to storage
Returns a URL to PUT the file to, valid 15 minutes and only for exactly size bytes. Then call POST /v1/inputs/{id}/parse. CSV, TSV, TXT, XLSX, XLS, ODS, Numbers, JSON or NDJSON, up to 50 MB.
ApiKeyAuthX-Api-Key<token>Idempotency-Key?stringAny unique string of yours (a UUID), so that sending the request again does not create it twice: for 24 hours, the same request with the same key answers the first answer again, with the header Idempotent-Replayed: true. The key is the workspace's, per route and path; sent with another body or query, it is refused (422 idempotency_key_reused); while the first request still runs, 409 idempotency_key_in_progress. Answers 5xx, 409 and 429 are not kept: the same key can be sent again.
^[\x20-\x7e]{1,255}$application/json- body
filename*stringThe file's name; its extension tells how to read it
1 <= length <= 255size*integerIn bytes
0 < valueWhere to send the file
application/json- response
id*stringupload_url*stringmethod*"PUT""PUT"headers*expires_in*integerSeconds
curl -X POST 'https://dataflow.piloterr.com/v1/inputs/uploads' \
-H 'Content-Type: application/json' \
-d '{
"filename": "asins.xlsx",
"size": 104857
}'{
"id": "3f6b1c9e-5d0a-4c7e-9a51-2b8e0f4d7a13",
"upload_url": "https://storage.example.com/dataflow/source?X-Amz-Signature=example",
"method": "PUT",
"headers": {
"Content-Length": "104857"
},
"expires_in": 900
}