FAQ / APIs

On this page

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:

  1. Retrieve all the entries/assets

  2. Perform an iterative process through all the entries/assets utilizing links_to_entry & links_to_assets query parameters

  3. The entries/assets that aren't linked to any entry return "total": 0 in 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: ?sys.contentType.sys.id[in]=content_type1,content_type2,...

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: entries?sys.id={entry_id}&include=5

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 sys.publishedVersion attribute.

add-circle remove style-two-pin-marker subtract-circle