Skip to Main Content
Feature Request FR-2567
Product Area Web Services
Status DELIVERED

2 Voters

Support "nextStartWith" pagination (ala OCI Object Storage) in REST Data Sources

joshua.caplan Internal
· Jun 13 2022

Idea Summary
Pagination support for Simple HTTP REST data sources currently only allows a numeric page size and offset/page number parameter; the pagination parameters are not even exposed for OCI REST data sources, although the documentation claims that pagination is natively supported.

Use Case
Any form element that shows an object list from Object Storage will benefit. Currently we only ever get the first 1000 results.

Preferred Solution (Optional)
If the target is object storage, perform pagination correctly without user intervention/configuration

This has been delivered in Oracle APEX 22.2 as part of bug 34297638!

Comments

Comments

  • carsten.czarski APEX Team OP 3.8 years ago

    Hi Joshua,

    the “OCI” REST Data Source type follows the pagination scheme described in the OCI REST API documentation:

    https://docs.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#ariaid-title13

    However, I just noticed that Object Store REST APIs follow a slightly different pagination scheme:

    List pagination for Object Storage ListObjects works differently because the pagination controls are also used for object name filtering. ListObjects returns nextStartWith instead of opc-next-page in the response body.

    So this is a valid enhancement idea, but I'd see this rather as an enhancement to the “OCI” REST Data Source type, and not to the Simple HTTP one.

    regards

    -Carsten

  • rnuskind OP 3.1 years ago

    Hi Carsten, 

    I am facing a similar issues with the pagination feature.  For a POC app I wanted to add a REST data source for the GroupMe messages API.  

    Here is a link to the documentation: https://dev.groupme.com/docs/v3

    Here is the relevant section of the documentation on how pagination works within their messages endpoint. 
     

    Messages can be scanned by providing a message ID as either the before_id, since_id, or after_id parameter. If before_id is provided, then messages immediately preceding the given message will be returned, in descending order. This can be used to continually page back through a group's messages.

    The after_id parameter will return messages that immediately follow a given message, this time in ascending order (which makes it easy to pick off the last result for continued pagination).

    Finally, the since_id parameter also returns messages created after the given message, but it retrieves the most recent messages. For example, if more than twenty messages are created after the since_id message, using this parameter will omit the messages that immediately follow the given message. This is a bit counterintuitive, so take care.

    If no messages are found (e.g. when filtering with before_id) we return code 304

     

    The after_id parameter within the GroupMe API is similar to the OCI Object Storage start parameter that should be set to the nextStartWith within the response. 

    I see that this feature is marked as delivered within APEX 22.2 but I'm not seeing a nextStartWith pagination option within Rest Data Source.  

    Can you advise how this can be accomplished within Apex 22.2?

    Thanks,

    Richard