kontent-ai/java-packages

Add support for items-feed endpoint

tobiaskamenicky opened this issue · 1 comments

Motivation

Allow developers to fetch all content item variants from the new \items-feed endpoint. This offers developers a way to export an entire project no matter the size.

Proposed solution

The content is is provided in small chunks together with a continuation token for the next chunk. The continuation token is sent in X-Continuation header both for request and response. Should the response from Delivery API contain the token, there are additional items to fetch. If the request does not contain the continuation header, Delivery API will return the first chunk.
Filtering parameters are same as for items endpoint but paging and depth are not supported.
The response has also the similar structure to items endpoint but paging object is missing and modular_content contains only components.

Implementation details for consistency: (name casing should be adapted according to the rest of SDK)
Add a new method to DeliveryClient with a name GetItemsFeed(). The method should support the same filtering parameters as GetItems() except for depth, skip and limit and return a content items variants feed.
The feed contains a bool property HasMoreResults that is true if the first batch was not yet fetched or there are more items to fetch (indicated by a continuation header in the previous response). The feed also contains a method FetchNextBatch() that would retrieve the next response from \items-feed endpoint.

Additional context

See .NET SDK for reference code

+1 this is sorely missed from the delivery SDK. any indication of when this might be looked at?