FAQ / APIs
On this page
- How to receive an alert notification when reaching the record limit?
- Is sys.id unique?
- Why do I receive a 404 error when fetching data from a specific environment?
- How to find entries/assets that are not linked to any entry?
- Is there an OR operator for querying entries?
- How to search for entries of multiple content types?
- How do I retrieve the linked entries/assets of an entry?
- Why do I see error "not resolvable" in API response?
- How to query never published entries?
How to receive an alert notification when reaching the record limit?
There isn't a built-in solution at the moment. However, you could set up a cron job that pings the Content Management API to calculate records usage (#records = #entries + #assets, current usage can be found at the "total" property in the API response), and triggers an alert notification once a threshold is reached.
Is sys.id unique?
No, sys.id is not unique per se. A globally unique identifier of a record is defined by 4 parts: (1) space ID, (2) environment ID, (3) entity type (entry or asset), (4) ID (sys.id)
Why do I receive a 404 error when fetching data from a specific environment?
It could be due to that the API token you use doesn't have access to the environment, you could go to 'Settings' -> 'API Keys' -> 'Environments' to check and configure it.
How to find entries/assets that are not linked to any entry?
You could use the Content Delivery API:
Retrieve all the entries/assets
Perform an iterative process through all the entries/assets utilizing links_to_entry & links_to_assets query parameters
The entries/assets that aren't linked to any entry return
"total": 0in the API response
The process might be costly, but it should be feasible if it is for housekeeping purposes.
Is there an OR operator for querying entries?
It is not directly possible via REST API, you will need to perform two requests to achieve so. Alternatively, it is possible to use GraphQL for OR operation, please find the documentation here.
How to search for entries of multiple content types?
You could use the inclusion operator, for example:
How do I retrieve the linked entries/assets of an entry?
You can query an entry and its related data in a single request with include parameter, since the parameter is only available for the entry collection endpoint, you could use a query like:
Why do I see error "not resolvable" in API response?
You can query an entry and its related data in a single request, however, if the linked items are unpublished or deleted, they will not be retrievable through the Delivery API and, as a consequence, a notResolvable error is returned in the API response.
How to query never published entries?
You could use
sys.publishedVersion[exists]=false in Content Management API to filter these entries. Entries that are never published don't have