Skip to content

feat: check header for pagination if plugin requires it#116

Open
ValentinaHutter wants to merge 1 commit into
CS-SI:mainfrom
ValentinaHutter:pagination-via-header
Open

feat: check header for pagination if plugin requires it#116
ValentinaHutter wants to merge 1 commit into
CS-SI:mainfrom
ValentinaHutter:pagination-via-header

Conversation

@ValentinaHutter
Copy link
Copy Markdown

No description provided.

@ValentinaHutter ValentinaHutter changed the title check header for pagination if plugin requires it feat: check header for pagination if plugin requires it May 29, 2026
@ValentinaHutter
Copy link
Copy Markdown
Author

I have been working on a plugin for the CMR api, which supports pagination via a CMR-Search-After value in the request header. In order to support this option, I added a next_page_token_location value in the code and put it into my providers.yaml:

   search: !plugin
    type: CMRSearch
    api_endpoint: "https://cmr.earthdata.nasa.gov/search/"
    ...
    pagination:
      next_page_token_location: header
      next_page_token_key: cmr_search_after

As this update might be useful for other plugins, where pagination is handled through the header, I added the code in this PR.
In my example, the plugin query function will then receive a cmr_search_after parameter, which can be used to handle pagination internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant