fedidb / issues

Public issue tracker for fedidb.org
https://fedidb.org
5 stars 0 forks source link

API servers endpoint pagination stops working before end of list #7

Open Pectojin opened 6 months ago

Pectojin commented 6 months ago

Describe the bug When using the /v1/servers API endpoint it doesn't seem possible to actually list all ~27 thousand instances known to fedidb.

It seems to stop at the same point every time, but that point changes based on the configured page limit. Using limit=40 will give you 4280 servers while limit=20 will give 3420 servers, and limit=10 gives 2730 servers.

At that point the links.next field returned will point to an empty page, which breaks the pagination.

{
    "data": [],
    "links": {
        "first": null,
        "last": null,
        "prev": null,
        "next": null
    },
    "meta": {
        "path": "https://api.fedidb.org/v1/servers",
        "per_page": 20,
        "next_cursor": null,
        "prev_cursor": null
    }
}

To Reproduce

It is also replicatable in the web UI

Expected behavior Each "next link" should continue to work until ~26,913 servers have been returned