Piloterr
API referenceInputs

Test a URL input

POST
/v1/inputs/url/preview

Reads the URL once, as a run would, and returns what it holds so columns can be mapped. Nothing is stored: use {"type": "url", "url": …} as a project's input, and every run reads the URL again. CSV, TSV, TXT, XLSX, XLS, ODS, Numbers, JSON or NDJSON, up to 50 MB; private and reserved addresses are refused. At most 10 previews a minute per workspace, URL and search previews together.

Authorization

ApiKeyAuth
headerX-Api-Key<token>

Request Body

application/json
  1. body
url*string

Kept encrypted whole when it has a query or a fragment (a presigned link, ?token=): the API then shows it with their values masked (?token=[REDACTED]). Sending that masked URL back on a change keeps the stored one.

Formaturi
Lengthlength <= 2048
headers?

Sent with every read, e.g. Authorization. Stored encrypted and only ever returned masked. On update, leaving it out keeps the stored ones while the URL stays on the same origin.

Response Body

What the URL holds (id is empty: nothing is stored)

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/url/preview' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://example.com/exports/asins.csv"
}'
Example Response
{
  "id": "",
  "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": []
  }
}