FAQs for retrieval of linked resource links

Does retrieving content from a different space work the same as retrieving content from the same space?

No, resolving linked entities from different spaces requires a special header to be passed in each request, named x-contentful-resource-resolution.

How many different spaces can I retrieve content from?

Only 3 extra space tokens are supported. That means you can make a single API call that resolves up to 4 spaces at the same time: 3 extra spaces and the spaceId from the initial request.

What is the maximum number of levels to retrieve content from different spaces?

You can retrieve up to 1 level of content from different spaces.

Do I need to provide auth tokens for the spaces I will retrieve content from?

Yes, you need to provide tokens in the new header for the spaces you will retrieve content from. That needs to be stringified and encoded to base64. Yielded string can then be used as a single token.

What happens if I provide wrong token(s) for the spaces I will retrieve content from?

An error will be returned in the errors property of the response and that spaceId won’t be resolved.

What happens if I provide more than 3 tokens in the header?

An error will be thrown if you provide more than 3 tokens.

Where can I see the resolved content from different spaces in the payload?

The includes property in the payload will contain the entry from a different space.

The API call will fail partially. For example, the entry will be returned successfully, but the failed link retrieval will not be included under the includes property in the payload. Successful link retrievals will be returned in the payload.

Can I retrieve linked items in the same space along with the linked items from different spaces in the same API call?

Yes. Content you call might have links within the same space, as well as, across different spaces. In this case, you can still retrieve content up to 10 levels for the same space links.

Yes, if the linked content you retrieved within the same space has links across different spaces, those can be resolved as well with respect to the limitation of 4 (3+1) different (distinct) spaces within the same request.

Yes, if the linked content retrieved from different spaces has in space links, those can be resolved up to 1 level as well.

Resolving cross-space links consumes the rate limits of each space requested. As such, it might not resolve cross-space entries completely if a space that needs to be resolved is already beyond its rate limits.

However, this is only valid for uncached requests. When your API calls are served from cached requests, then the rate limit will not be consumed.

Was this helpful?
add-circle arrow-right remove style-two-pin-marker subtract-circle remove