Piloterr
API referenceRuns

Download a run's results

GET
/v1/runs/{id}/export

The run's results as a file, in any format whatever the project's output_formats, as an attachment named run-{id}.{format}. JSON and NDJSON hold the result lines; CSV and XLSX flatten nested fields into dotted columns; CSV prefixes text that looks like a formula with ' (its header too), never a number; XLSX keeps the answer's numbers and booleans as typed cells and the rest as text cells, which never run. rows, status and http_status keep some rows, as /results filters them. While the run goes, the rows stored so far. The file is streamed, never zipped: JSON, NDJSON and CSV come gzipped (Content-Encoding: gzip) to a client that sends Accept-Encoding: gzip; XLSX is compressed already. For a link that downloads without the API key, GET /v1/runs/{id}/export/link.

Authorization

ApiKeyAuth
headerX-Api-Key<token>

Path Parameters

id*string

The run's id (GET /v1/projects/{id}/runs, or the answer of POST /v1/projects/{id}/runs)

Length1 <= length

Query Parameters

format?string

The file's format

Default"json"
Value in"json""ndjson""csv""xlsx"
merged?string

The run with its retries: one line per row, the latest attempt winning (from any run of the family), in a file named run-{first run's id}-merged.{format}; the filters then apply to each row's latest attempt

Value in"true""false"
rows?string

ok: only the rows that succeeded (as status=ok), ko: only those that failed or were invalid (as status=failed). status wins when both are sent. Same columns as the full export; the file name ends in -ok or -ko.

Default"all"
Value in"all""ok""ko"
status?string

Only the rows with this status; failed: those that failed or were invalid, as many as the run's ko

Value in"ok""error""invalid""failed"
http_status?integer

Only the rows the API answered with this HTTP status

Range100 <= value <= 599
q?string

Only the rows holding this text, as /results?q= finds them, but across the whole run: the file is streamed, without the search's limit. The file name ends in -search- and 8 characters of the search's hash

Lengthlength <= 200
columns?string

CSV and XLSX only: these columns, comma-separated, in this order, instead of all of them. input.* for every input column; _status, _http_status, _error, _credits (what the row cost); any column of the full export (organic_results, hq.city); or a dotted path into the answer, array positions as numbers (organic_results.0.title). A column no row has stays, empty. JSON and NDJSON ignore it. The file name ends in -columns- and 8 characters of their hash

Lengthlength <= 8000

Response Body

The file (content-type of its format)

response?unknownapplication/octet-stream
Example Request
curl -X GET 'https://dataflow.piloterr.com/v1/runs/string/export'
Example Response
null