Piloterr
Referência da APIInputs

Parse an input's file

POST
/v1/inputs/{id}/parse

After a presigned upload, or to read an uploaded file again with another sheet, header line or deduplication. Projects using the input get the new rows on their next run.

Autorização

ApiKeyAuth
headerX-Api-Key<token>

Parâmetros de caminho

id*string

The input's id, from POST /v1/inputs, POST /v1/inputs/list or POST /v1/inputs/uploads

Length1 <= length

Corpo da requisição

application/json
  1. body
sheet?string

Default: the first sheet

header?integer

The non-empty line holding the column names, from 1. 0: there is none, columns are column_1, column_2…

Range0 <= value <= 100
Default1
dedupe?boolean

Drop rows identical to an earlier one

Defaultfalse

Corpo da resposta

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/string/parse' \
  -H 'Content-Type: application/json' \
  -d '{
  "sheet": "Products",
  "header": 1,
  "dedupe": true
}'
Example Response
{
  "id": "3f6b1c9e-5d0a-4c7e-9a51-2b8e0f4d7a13",
  "filename": "asins.xlsx",
  "columns": [
    "asin",
    "marketplace"
  ],
  "row_count": 3,
  "sample": [
    {
      "asin": "B09DFCB66S",
      "marketplace": "com"
    },
    {
      "asin": "B08N5WRWNW",
      "marketplace": "com"
    },
    {
      "asin": "",
      "marketplace": "fr"
    }
  ],
  "sheets": [
    "Products",
    "Archive"
  ],
  "stats": {
    "empty_rows": 0,
    "duplicate_rows": 1,
    "deduplicated": true,
    "row_error_count": 0,
    "row_errors": []
  }
}