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 <[email protected]> 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) <
> [email protected]> 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
>> [email protected]
>> https://www.redhat.com/mailman/listinfo/pulp-list
>
> _______________________________________________
> Pulp-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/pulp-list
_______________________________________________
Pulp-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-list

Reply via email to