Builder API
Errors and limits
The error shape, what each status means and what to do, and the limits per call and per caller.
Every error has the same shape, and its message says what to change.
{ "error": { "code": "range_too_large", "message": "…" } }Status codes
| Status | Meaning | What to do |
|---|---|---|
| 400 | The input cannot be served as given. | Read code and message and change the request (a shorter range, a larger bucket, fewer points). Never retry it unchanged. |
| 401 | Not signed in, the sign-in expired, or the token is for another API. | Refresh the token or sign in again. Check the audience (see Authentication). |
| 403 | No access to the tenant, or to any tenant. | Use a tenant from GET /me, or ask Relynk for access. |
| 404 | No such function or version. | Check the path against the API reference. |
| 429 | Too many requests, or too many at once. | Wait the Retry-After seconds when the header is set, and make fewer calls at the same time. |
| 500 | Something went wrong on Relynk's side. | Try again later; tell Relynk if it persists. |
Input error codes
A 400 carries one of these codes:
| Code | Meaning |
|---|---|
BAD_REQUEST | The request itself is wrong, such as a missing tenantId when the caller has several tenants. |
invalid_input | The body does not match the function's input. |
invalid_range | The time range is not valid (for example to before from, or not on a whole hour where one is needed). |
range_too_large | The range is longer than the function allows: split it. |
too_many_buckets | Too many points × buckets: use fewer points or a larger bucket. |
unknown_points | A point id does not exist or is not visible to the caller. |
unknown_meters | A meter id does not exist or is not visible to the caller. |
unknown_buildings | A building id does not exist or is not visible to the caller. |
unknown_relationship | The relationship name is not known. |
unknown_type_key | The type key is not known; look it up with resourceTypes.list. |
Unknown ids, type keys and relationships are errors, never empty results.
Limits per caller
| Limit | Value |
|---|---|
| Requests | 600 per minute per caller (RATE_LIMITED beyond) |
| Calls at the same time | 8 per caller (TOO_MANY_CALLS beyond); BUSY when the service is busy |
| Request body | 256 KiB |
Make calls one after another, or a few at a time.
Limits per call
Each function limits how much one call may ask for. A call over a limit fails with a 400 that says how to split it. See Paging and limits.