Errors and limits

Costs apply to Growbud Cloud only. Calls to your own Edge Server are free. They use no API balance and have no X-API-Balance-USD header.

Sensors, thresholds and account

An error is text, not JSON. The 405 is JSON: {"error": "..."}.

StatusWhen
400A parameter is not valid. The text tells which.
401There is no token, or the token is not valid.
403API access is off in your profile. Or you have no API credits: API credits exhausted. Please recharge your account. Or none of the sensors you asked for are on your account.
405PUT /api/thresholds or PUT /api/thresholds/batch. You cannot change thresholds with this API. Change them in the Growbud app or on an Edge Server.
429About 60 requests in one minute. Wait, then send again.
500A server error. Send the request again.

Costs (Growbud Cloud only)

These calls go to Growbud Cloud at https://growbud-api-a2a9c.web.app. Each request that passes authentication is charged from your USD balance, also if it then fails. The X-API-Balance-USD header gives the balance after the request, to the nearest cent.

EndpointCost (USD)
/api/list-sensors$0.0001
/api/thresholds$0.0005
/api/latest$0.0005
/api/query$0.0001 + $0.00001 for each hour of duration ($0.0217 maximum)
/api/balanceNo charge

The same reads on your Edge Server are free.

History

SensorHistory from /api/query
Growbud sensor2160 hours (90 days) maximum, as 15-minute averages
LoRaWAN sensor with a label serial2160 hours maximum, as 15-minute averages
LoRaWAN sensor with no label serial168 hours (7 days) maximum, each reading

metadata.historyStart gives the time of the first data for a LoRaWAN sensor. If duration starts before that time, the data starts at historyStart and metadata.clamped is true. pressure_hpa is kept 7 days.

Outlets, Controllers and the Write API

An error is JSON:

{ "error": { "code": "permission_denied", "message": "This token may read only. Control needs a token with the control scope." } }
StatusCodeWhen
400invalid_argumentA parameter or a body field is not valid.
401unauthenticatedThere is no token. Or the token is not from this Edge Server, is revoked or has expired.
403permission_deniedThe token has no control scope.
404not_foundThe outlet, Controller or command does not exist, or is in a different organization.
405invalid_argumentThe path is correct, but the method is not.
409managed_elsewhereThe Edge Server is on standby. Make the change in Growbud Cloud.
409failed_preconditionYou cannot do this now. For example, the Controller output has no load type.
429rate_limitedMore than 30 requests in one minute with no valid token. Wait one minute.
500internalA server error. Send the request again.
502, 503unavailableThe Edge Server could not complete the request. Nothing changed. Send it again.

Wait for a result

Some calls take wait, 0 to 30 seconds. The answer comes when the result is final, or when the time ends. A value more than 30 gives 400. These calls take wait:

  • Outlets: POST .../switch and GET .../commands/{commandId}.
  • Controllers: POST .../outputs/{ch}/switch and GET .../commands/{commandId}.

Retention

DataKept
Power readings35 days
Commands30 days
Record of control calls365 days