[Koha] API paging, userid patron query
Eric Phetteplace
ephetteplace at cca.edu
Thu Aug 31 10:45:28 NZST 2023
Hi all,
Ah-ha, so there were paging options! My apologies, I could have discovered
these with a little more thorough research. Thanks to Lucas and Lari for
their helpful replies.
For my purposes, either approach works, and it did turn out to be an issue
where the result I was looking for simply wasn't in the first page.
Increasing the RESTdefaultPageSize option or using a higher _per_page
parameter in the query string both worked.
Best,
ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)
ephetteplace at cca.edu
*CCA is situated on the traditional unceded lands of the **Chochenyo and
Ramaytush Ohlone** peoples.*
Black-owned bookstores in Oakland: Ashay by the Bay
<https://ashaybythebay.com/>, Marcus Books
<https://www.facebook.com/marcus.books/>
:(){ :|: & };:
On Wed, Aug 30, 2023 at 1:47 PM Lari Taskula <lari.taskula at hypernova.fi>
wrote:
> Hi,
>
> See https://api.koha-community.org/#tag/patrons/operation/listPatrons
>
> Especially query parameters _page and _per_page.
>
> If you suspect there may be more results than 12, you can find the total
> number of results in response headers. X-Total-Count header containing
> the total results count, and X-Base-Total-Count header containing the
> total of the non-filtered results count.
>
> Lari Taskula
> CEO, Hypernova Oy
> PL 16
> 80101 Joensuu, Finland
>
> On 30.8.2023 22.16, Eric Phetteplace wrote:
> > Hi collective wisdom,
> >
> > Are there secret paging parameters for the Koha REST API? I don't see any
> > in the documentation.
> >
> > Specifically, I'm using the list patrons route like
> > /api/v1/patrons?userid={query} but I have a username that is short and a
> > subset of many other usernames. The API returns 12 results and the user
> > account, which I can see exists, is not included amongst them. I'm
> > wondering if I need to page through more results, but blind guessing of
> > parameters like "page", "offset", and "start" only leads to "malformed
> > query string" errors.
> >
> > Best,
> >
> > ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)
> >
> > ephetteplace at cca.edu
> >
> >
> > *CCA is situated on the traditional unceded lands of the **Chochenyo and
> > Ramaytush Ohlone** peoples.*
> >
> > Black-owned bookstores in Oakland: Ashay by the Bay
> > <https://ashaybythebay.com/>, Marcus Books
> > <https://www.facebook.com/marcus.books/>
> >
> > :(){ :|: & };:
> > _______________________________________________
> >
> > Koha mailing list http://koha-community.org
> > Koha at lists.katipo.co.nz
> > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
>
More information about the Koha
mailing list