<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>A new request with request id 8363 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is : <br><br>Title : Koha-devel Digest, Vol 200, Issue 17<br>Category : <br>Description : <div>Send Koha-devel mailing list submissions to<br>    koha-devel@lists.koha-community.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>    https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>or, via email, send a message with subject or body 'help' to<br>    koha-devel-request@lists.koha-community.org<br><br>You can reach the person managing the list at<br>    koha-devel-owner@lists.koha-community.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Koha-devel digest..."<br><br><br>Today's Topics:<br><br>   1. Re: Checkouts API Question (Renvoize, Martin)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Wed, 13 Jul 2022 11:28:17 +0100<br>From: "Renvoize, Martin" <martin.renvoize@ptfs-europe.com><br>To: Stephen Graham <s.graham4@herts.ac.uk><br>Cc: "koha-devel@lists.koha-community.org"<br>    <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] Checkouts API Question<br>Message-ID:<br>    <CAB7SL8Ci=O=WLf8MAWffDd0dqm2+gq9_YXm6t_M16eO8xAoVjA@mail.gmail.com><br>Content-Type: text/plain; charset="utf-8"<br><br>Hi Stephen,<br><br>In the latest Koha version, we've added some additional x-koha-embed<br>options to the patrons API:<br>https://api.koha-community.org/Development.html#operation/listPatrons..<br>however from the looks of checkouts is just a count at the moment.  We have<br>to be a little careful will how much we expose using the embedding logic<br>for performance reasons.. although it may seem counterintuitive, sometimes<br>it's easier on the server to have multiple requests than to have a single<br>large request with a lot of join logic internally.<br><br>Hmm, having said that, it does look like a mistake to me that the<br>/checkouts endpoint doesn't support 'items' being embedded yet.. and<br>perhaps even 'items.biblio'.. I can look into that as a future addition.<br>It'll need a little investigation to know to what extent we should expose<br>embedding vs encouraging subsequent API calls for details.<br><br>*Martin Renvoize, MPhys (Hons)*<br><br><https://www.ptfs-europe.com><br><br>Head of Development and Community Engagement<br><br><br><br>*Phone:* +44 (0) 1483 378728<br><br>*Mobile:* +44 (0) 7725 985 636<br><br>*Email:* martin.renvoize@ptfs-europe.com<br><br>www.ptfs-europe.com<br><br><br>*Sign up for our newsletters here <http://eepurl.com/dPjjkn> or by scanning<br>the QR code*<br><br><br><br>Registered in the United Kingdom No. 06416372   VAT Reg No. 925 7211 30<br><br>The information contained in this email message may be privileged,<br>confidential and protected from disclosure. If you are not the intended<br>recipient, any dissemination, distribution or copying is strictly<br>prohibited. If you think that you have received this email message in<br>error, please email the sender at info@ptfs-europe.com<br><br><br>On Tue, 12 Jul 2022 at 16:05, Stephen Graham <s.graham4@herts.ac.uk> wrote:<br><br>> Thanks Arthur for the quick reply! I had totally forgotten about the<br>> ILS-DI interface. We do have it set up on our test server – so that is<br>> defiantly an option.  We have written a custom endpoint for something else<br>> previously so maybe we should explore that avenue again to achieve what we<br>> want – I prefer the Oauth2 authentication I think.<br>><br>><br>><br>> Cheers, Stephen<br>><br>><br>><br>> *From:* Koha-devel <koha-devel-bounces@lists.koha-community.org> *On<br>> Behalf Of *Arthur<br>> *Sent:* 12 July 2022 15:15<br>> *To:* koha-devel@lists.koha-community.org<br>> *Subject:* Re: [Koha-devel] Checkouts API Question<br>><br>><br>><br>> Hi Stephen,<br>><br>> Although it's quite old, the ILS-DI interface is still available in 21.11.<br>><br>> You can check the GetPatronInfo with "show_loans=1" parameter (perhaps by<br>> default?) to get the loans.<br>><br>> Then you also get bibliographic information about those loans in one API<br>> call.<br>><br>> However, ILS-DI is not secure by design, there is no authentication, which<br>> means, when you activate ILS-DI it is open to everyone to get personnal<br>> information on any of your patrons by scraping with random biblionumber,<br>> just be aware of this a put decent security (we use IP restriction which is<br>> not ideal but minimum required IMO)<br>><br>> Best,<br>><br>> Arthur Suzuki<br>><br>> Developper @BibLibre<br>><br>> On 12/07/2022 16:06, Stephen Graham wrote:<br>><br>> Hi All – we are on 21.11, and would like to include patron account data in<br>> our bespoke University mobile app. I was planning on using the RESTful API<br>> to get the data. What we would like is simply a list of titles (plus author<br>> and ISBN) along with the due back dates.  I’m struggling , when looking at<br>> https://api.koha-community.org/21.11.html, to see how this could be done<br>> without using lots of API calls. Would I have to do something like the<br>> following:<br>><br>><br>><br>>    1. Call /checkouts to get a list of checkouts from the patron<br>>    2. Iterate over the checkout_id and call /checkouts/$id for each<br>>    checkout<br>>    3. I cannot see any Biblio references in the returned data, so I’d<br>>    have to then grab the biblio_id from the /items/$id endpoint and then call<br>>    the /biblios endpoint to get the actual bibliographic data.<br>><br>><br>><br>> If the patron had 10 items out this would be at least 30 calls to get the<br>> bib data. Is that what I would have to do, or am I missing something – like<br>> a header or extra query which would return all the info I require from the<br>> first endpoint call?<br>><br>><br>><br>> Any advice/pointers would be much appreciated!!<br>><br>><br>><br>> Cheers, Stephen<br>><br>><br>><br>> --------------------------------------<br>><br>> Stephen Graham<br>><br>> Library Technology Consultant<br>><br>> Library and Computing Services<br>><br>><br>><br>> University of Hertfordshire<br>><br>> Hatfield, Hertfordshire, AL10 9AB<br>><br>><br>><br>> Email: s.graham4@herts.ac.uk<br>><br>> Website: herts.ac.uk<br>><br>><br>><br>><br>><br>> _______________________________________________<br>><br>> Koha-devel mailing list<br>><br>> Koha-devel@lists.koha-community.org<br>><br>> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>><br>> website : https://www.koha-community.org/<br>><br>> git : https://git.koha-community.org/<br>><br>> bugs : https://bugs.koha-community.org/<br>><br>> _______________________________________________<br>> Koha-devel mailing list<br>> Koha-devel@lists.koha-community.org<br>> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>> website : https://www.koha-community.org/<br>> git : https://git.koha-community.org/<br>> bugs : https://bugs.koha-community.org/<br>><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220713/cc984d09/attachment-0001.htm><br><br>------------------------------<br><br>Subject: Digest Footer<br><br>_______________________________________________<br>Koha-devel mailing list<br>Koha-devel@lists.koha-community.org<br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>website : https://www.koha-community.org/<br>git : https://git.koha-community.org/<br>bugs : https://bugs.koha-community.org/<br><br><br>------------------------------<br><br>End of Koha-devel Digest, Vol 200, Issue 17<br>*******************************************<br></div><br><br>NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.<br></body></html>