iBusAPI

Limits and errors

Limits#

WhoPer minute (burst)Per day, UTCPer month, UTCAt onceHeavy: per minute / day
Project, «trial»30 (10)1,00020,0002—
Project, «standard»120 (30)20,000400,0004—
Project, individual (example)120 (30)20,000400,00046 / 300
Without a key: older addresses only, per address (transition)60 (30)20,000400,000620 / 600

Error format#

Every answer that is not 2xx has the same JSON body:

Error
{"code": "RATE_LIMITED", "detail": "", "source_state": null}

code is for your program, detail is a short technical hint (often empty), source_state is unavailable when a data source failed.

Error codes#

codeHTTPWhat it means and what to do
BAD_REQUEST400A parameter has a wrong form (checked by the gateway). Fix the request; repeating it does not help.
UPSTREAM_422422A query parameter is missing or out of range (e.g. limit=0). Fix the request.
NOT_FOUND404The address is not a published path, or a code has a wrong form.
UPSTREAM_404404The object is not in the source (e.g. Stop not found, an alert that already ended).
METHOD_NOT_ALLOWED405Only GET and HEAD are accepted.
RATE_LIMITED429Too many requests per minute: of your project (with a key) or of your network (without a key). Wait Retry-After seconds.
UPSTREAM_UNAVAILABLE502 / 503An internal service or the data source is not reachable. Retry later with a growing pause.
UPSTREAM_TIMEOUT504The data source answered too slowly. Retry later.
GATEWAY_BUSY503The gateway is at its concurrency limit. Retry after a short pause.
UPSTREAM_BAD_ANSWER502The internal service answered something that is not valid JSON. Retry later; report it if it repeats.

Refusals of the access check (key, IP address, project, limits) have their own codes: access errors.

Retrying#

Timeouts#

The gateway waits up to 12 seconds for arrivals and up to 20 seconds for a day timetable before it answers 504. Set your client timeout a little longer, for example 15–25 seconds.

Guide
↑ ↓ moveEnter openEsc close