Piloterr

Project settings

Set a project's pace, cost cap, output formats, fields to compare and the API key its calls go out with.

These fields set how a project runs. Send them when you create the project, or later with PATCH /v1/projects/{id}:

FieldDefaultEffect
nameRequired, 1 to 120 characters.
rate_percent50The share of your plan's per-second rate limit each run may use, a whole number from 10 to 100. See Limits.
max_cost_per_runnullThe most credits one run may use, a whole number from 1. A run that reaches it with rows left stops and ends failed with reason max_cost. null for no cap, on an endpoint billed per call. Required on an endpoint whose billing_mode is per_row (per result) or per_gb: without it, 422 validation_failed with details[0].path max_cost_per_run.
output_formats["json"]json, ndjson, csv or xlsx, at least one. The first one is the file linked in the run.completed webhook and in result emails; cloud storage deliveries upload each of them. GET /v1/runs/{id}/export takes any format, listed or not.
scheduleManualWhen the project runs on its own. See Schedules.
tracked_fields[]Up to 50 fields of the result that the comparison between runs looks at, as named in the CSV export's columns; a name covers the fields nested under it. Empty: every field but volatile ones, such as request ids and fetch times.
api_key_idnullThe API key its calls go out with. null: the managed Dataflow key. See API key.

The cap counts what each run spends, from 0: it is not a budget for the project or the month, and a retry is a run of its own. It counts the run's credits, as the Piloterr API bills its rows (see Follow a run), with the calls a search input made to search first (search_credits). No row starts once the rows under way could reach the cap, so a run goes past it by less than one row's cost. The results the run received are kept. A run that reaches the cap on its last row completes. The cap also lowers the balance a run needs to start, by hand or on a schedule: the cap plus one row, when that is less than every row. For endpoints billed per result, each row under way counts at the dearest row the run billed so far, and a run sends one row before it bills any; for endpoints billed per GB, each row counts at the endpoint's credit_cost, its minimum, so the cap is an estimate there. A run on them could otherwise spend far more than its rows suggest, so those projects must set a cap, on creation and whenever they change (null is refused). See Max cost per run.

billing_modeA row costsmax_cost_per_run
per_callcredit_cost when the call is answered 200, 201 or 404 (a 404 is free on some endpoints)Optional
per_rowcredit_cost per result in the answerRequired
per_gbAt least credit_cost; the size is billed apartRequired

API key

By default, a project's calls go out with a key Dataflow keeps for your workspace (Dataflow (managed), created on first use). Revoking a member's own key never stops a project.

To count a project's calls on one of your own keys instead (its request limits, its line in the request log), set api_key_id to one of the ids GET /v1/api-keys lists:

{
  "items": [
    { "id": "MANAGED_KEY_ID", "alias": "Dataflow (managed)", "category": "production", "hint": "••••9f2c", "managed": true, "usable": true, "expires": null },
    { "id": "API_KEY_ID", "alias": "Price monitoring", "category": "production", "hint": "••••a1b2", "managed": false, "usable": true, "expires": null }
  ]
}

The managed key comes first (managed: true, once created), then your own keys by alias. Only their last characters are shown (hint). A key with usable: false is inactive or expired and cannot be set. Sending the managed key's own id is the same as null: the project stores "api_key_id": null. Then, on creation, from a template or with PATCH /v1/projects/{id}:

{ "api_key_id": "API_KEY_ID" }

The key must belong to your workspace, be active and not expired (422 api_key_invalid otherwise). If it is later deactivated, expires or is deleted, the project does not switch to the managed key: its next run fails with reason api_key_invalid, the project is disabled for that reason (disabled_reason: "api_key_invalid", its schedule stops, new runs answer 409 project_disabled) and your alerts receive run.failed. Set a usable key, or null for the managed one, with PATCH /v1/projects/{id}: the project and its schedule run again. A search input runs its searches with the same key, and so does the first page read to check the mapping.

Piloterr keeps the managed key active. If it is ever inactive, previews and saving a project that would use it answer 422 api_key_invalid, and its runs fail with reason api_key_invalid without disabling the project: contact support.

On this page