Magidoc

Rate Limiting

The Cloudshelf API has limitations in place to protect against excessive or abusive calls to our servers, this ensures our platform remains stable for all users.

Unlike a typical REST API, queries are analysed when the incoming request is received and the complexity of the query is calculated.

This complexity is then used to determine the number of credits required to execute the query, and blocks the query before execution if the user does not have enough credits.

Query Complexity

#

Fields have a “complexity” value, which is indicative of how complex it is to retrieve the value internally. Most fields have a complexity of 1 (and our documentation will specify if this is not the case).

Queries have a maximum complexity of 500, which, if exceeded, will result in a fatal error.

Response for an excessively complex query
#
    
  

Deeply nested queries

#

Queries that are deeply nested will have a higher complexity than those that are not. This is because the query will require more database lookups to retrieve the data. The Cloudshelf API imposes a flat maximum depth of 20 levels of nesting. Anything beyond this will result in a fatal error.

Response for a deeply nested query
#