Piloterr
API referenceInputs

Upload an input file

POST
/v1/inputs

CSV, TSV, TXT, XLSX, XLS, ODS, Numbers, JSON or NDJSON, up to 50 MB, 100,000 rows and 1,000 columns, values of up to 32,767 characters, parsed at once. The first line holds the column names unless header says otherwise. A workspace reads one file at a time: another upload or parse meanwhile answers 429 parse_busy. For big files, prefer POST /v1/inputs/uploads.

Authorization

ApiKeyAuth
headerX-Api-Key<token>

Header Parameters

Idempotency-Key?string

Any 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.

Match^[\x20-\x7e]{1,255}$

Request Body

multipart/form-data
  1. body
file?file

The file; its extension tells how to read it

Formatbinary
sheet?string

A spreadsheet's sheet; default: the first

header?string

As in ParseOptions; default 1

Match^\d{1,3}$
dedupe?string

true: drop rows identical to an earlier one

Value in"true""false"

Response Body

Parsed input

application/json
  1. response
id*string
filename*string|null
columns*array<string>
row_count*integer
sample*array<>
sheets*array<string>
stats*
Example Request
curl -X POST 'https://dataflow.piloterr.com/v1/inputs'
Example Response
{
  "id": "3f6b1c9e-5d0a-4c7e-9a51-2b8e0f4d7a13",
  "filename": "asins.csv",
  "columns": [
    "asin",
    "marketplace"
  ],
  "row_count": 3,
  "sample": [
    {
      "asin": "B09DFCB66S",
      "marketplace": "com"
    },
    {
      "asin": "B08N5WRWNW",
      "marketplace": "com"
    },
    {
      "asin": "",
      "marketplace": "fr"
    }
  ],
  "sheets": [],
  "stats": {
    "empty_rows": 0,
    "duplicate_rows": 0,
    "deduplicated": false,
    "row_error_count": 0,
    "row_errors": []
  }
}