Whether clients should collect probes, and how
const url = 'https://api.tareky.com/v1/probes/config';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tareky.com/v1/probes/config \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Legacy key id (until its sunset)
Responses
Section titled “Responses”object
Send probes while navigating. False: stop collecting and drop what is queued
Detect drives and send probes with the app closed (Android). Off until it is released
Share of installs, 0..100, that may detect drives while passive is on: an app takes part when a stable hash of its install id (x-client-id) mod 100 is below it. 0 = nobody
How often a device uploads
object
Seconds between uploads while navigating
Seconds between uploads while passively collecting
Longest a recorder may hold a point before releasing it, so traffic is fresh in minutes. Null: hold until 500 m past the trip start (the default)
How a client should encode an upload: json (the default) or binary (Content-Type application/x-tareky-probes; v=1, about a fifth of the bytes: packages/nav-core/src/probe-wire.ts). Both are always accepted; a client that does not know binary keeps sending JSON
Adaptive sampling: where 25+ sessions already cross a cell in a heading, a client uploads only keep of its sessions (chosen by a hash of its session id, so a kept session stays kept). Null: send everything
object
Slippy-map zoom of a cell (15: ~1 km across)
Dense cells, each <tile index in base 36>:<hex mask of the heading octants>; the tile index is x * 2^cellZoom + y; octant 0 is north, 1 north-east, clockwise
Share of sessions, 0..1, a client keeps sending while inside a dense cell
A client forgets this rule this long after fetching it and sends everything again
Shape of this answer; a client ignores fields it does not know
Example
{ "wire": "json"}Rate limit or monthly quota exceeded; see Retry-After
object
object
Stable machine-readable code, e.g. quota_exceeded, no_route
For invalid_request: the validation issues
Examplegenerated
{ "error": { "code": "example", "message": "example", "status": 1, "details": "example", "docsUrl": "example" }, "requestId": "example"}default
Section titled “default”Any other error, in the /v1 error envelope
object
object
Stable machine-readable code, e.g. quota_exceeded, no_route
For invalid_request: the validation issues
Examplegenerated
{ "error": { "code": "example", "message": "example", "status": 1, "details": "example", "docsUrl": "example" }, "requestId": "example"}