jenkinsci / jenkinsci/rest-list-parameter-plugin

[FEATURE] Support continuation tokens

Open
#86 2 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
14
Forks
13
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
When nexus responds with a list of items, the response contains a maximum of 10 items and a continuation token, if there are more items. With the current plugin capabilities, I can only get 10 items from my nexus repository.

**Describe the solution you'd like**
A general solution, where if a continuation token is found, the request is repeated with that continuation token.

**Describe alternatives you've considered**
I don't think there is a workaround, this feature is put in place as a security measure. You might want a switch that can turn the behavior off. I can see that it might cause problems.

**Additional context**
I found a site explaining the technique. https://phauer.com/2017/web-api-pagination-continuation-token/ From this, it seems to me that this feature is at least semi-standard in rest apis, even if it seems not to be too popular. Is there a place for a feature like this in the plugin? Is it too specific? Unfortunately, it seems like there isn't a consensus on how the API expects the continuation token. It might be some header or a query parameter.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.