Get the versions of a document with bodies

We currently use Get Content Versions and expand by content to get the history of a document, including the content.

The version 2 of the REST API does not allow expanding the content. In this case, if we want to show 200 entries of the history of a document, we need to make 200 parallel requests to the get content endpoint.

This looks like error-prone. We need to manage the errors for all the requests to retry them if they fail. Also, we wonder if this can hit any kind of rate limiting in the API.

Will be any other way to get the content of the versions in v2 REST API?
Is making hundreds of parallel request acceptable for the RESP API?

Best regards
Iñaki Ibarrola

3 Likes

:wave: Hi @InakiIbarrola - appreciate the feedback here!

Luckily I think we have what you need! Would the Get versions endpoints with the body-format parameter work for your use case?

For example: Get page versions with the query param body-format=format-here

This can be used to fetch the body of a piece of content in bulk.

For more details that are only available in the version details endpoints, yes additional requests would be required, one for each version. Are there other fields in particular you want to load in bulk besides the body?

Thanks Simon, we’ll check it.

1 Like