Guidelines

API usage guidelines

You are using up the same resources by using Silverbucket User Interface via browser and Customer API within integrations. Interface is prioritised over the API so this means API is given less time. This means there is couple of things you will need to consider when building integrations towards our API:


Be conservative
There is much power to the API with great ways to: 
  • Fetch what you need: Filter down the data you are fetching. Among the classical filtering there is possibility to use  filtering extensions  within all endpoints. 
  • Use grouping where possible:  Group your data  with grouping endpoints to get your data summed up to the level you need it.
  • Bulk create: Most endpoints have the ability to  create in masses .  
It is often not needed to fetch every single bit of data - fetch what you need.


Be patient
To prevent our API from being overwhelmed by too many requests, we'll throttle requests to our API.

This means that sometimes you might need to be patient. If you are exceeding your rate limits, which is roughly 200 requests per minute, API will respond to you with  http status code 429 

Example response:
HTTP 429 Too Many Requests
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Retry-After: 3
Vary: Accept

{
"detail": "Request was throttled. Expected available in 3 seconds.",
"status_code": 429
}

There is no harm in this, you will just need to wait for a moment before continuing. Estimate of the time needed for you to get more quota is given within Retry-After.