API referenceInputs
Parse an input's file
POST
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.
ApiKeyAuthheader
X-Api-Key<token>id*stringThe input's id, from POST /v1/inputs, POST /v1/inputs/list or POST /v1/inputs/uploads
Length
1 <= lengthapplication/json- body
sheet?stringDefault: the first sheet
header?integerThe non-empty line holding the column names, from 1. 0: there is none, columns are column_1, column_2…
Range
0 <= value <= 100Default
1dedupe?booleanDrop rows identical to an earlier one
Default
falseParsed input
application/json- response
id*stringfilename*string|nullcolumns*array<string>row_count*integersample*array<>sheets*array<string>stats*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": []
}
}