[Pulp-list] pulp 3 output limit

Daniel Alley dalley at redhat.com
Wed Oct 30 16:55:07 UTC 2019


Pulp uses limit-offset pagination from Django Rest Framework, so when you
make queries you should be getting something like this back:

HTTP 200 OK{
>     "count": 1023
>     "next": "https://api.example.org/accounts/?limit=100&offset=500",
>     "previous": "https://api.example.org/accounts/?limit=100&offset=300",
>     "results": [
>>     ]}
>
> So you can either use a limit higher than the number of repositories
("count") as David suggested, or you can page through them using the "next"
href.

https://www.django-rest-framework.org/api-guide/pagination/#limitoffsetpagination

On Tue, Oct 29, 2019 at 11:35 AM David Davis <daviddavis at redhat.com> wrote:

> You need to specify limit as a query string parameter in your GET request:
>
> http GET :80/pulp/api/v3/repositories/?limit=500
>
> David
>
>
> On Tue, Oct 29, 2019 at 11:12 AM Bin Li (BLOOMBERG/ 120 PARK) <
> bli111 at bloomberg.net> wrote:
>
>> We have over 100 repositories. However we can only list 100 repos. limit
>> doesn't work somehow. How I can list all our repositories?
>>
>> # http GET :80/pulp/api/v3/repositories/ limit=500 | jq -r '.results[]
>> |.name' | wc -l
>> 100
>>
>> _______________________________________________
>> Pulp-list mailing list
>> Pulp-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/pulp-list
>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20191030/8b3b3ff1/attachment.htm>


More information about the Pulp-list mailing list