A new request with request id 8323 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is :

Title : Koha-devel Digest, Vol 200, Issue 14
Category :
Description :
Send Koha-devel mailing list submissions to
    koha-devel@lists.koha-community.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
or, via email, send a message with subject or body 'help' to
    koha-devel-request@lists.koha-community.org

You can reach the person managing the list at
    koha-devel-owner@lists.koha-community.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Koha-devel digest..."


Today's Topics:

1. Checkouts API Question (Stephen Graham)
2. Re: Checkouts API Question (Arthur)


----------------------------------------------------------------------

Message: 1
Date: Tue, 12 Jul 2022 14:06:43 +0000
From: Stephen Graham <s.graham4@herts.ac.uk>
To: koha-devel <koha-devel@lists.koha-community.org>
Subject: [Koha-devel] Checkouts API Question
Message-ID:
    <LO0P265MB2620EAAD46E0CA69B7CBA2BEE7869@LO0P265MB2620.GBRP265.PROD.OUTLOOK.COM>
    
Content-Type: text/plain; charset="windows-1252"

Hi All - we are on 21.11, and would like to include patron account data in our bespoke University mobile app. I was planning on using the RESTful API to get the data. What we would like is simply a list of titles (plus author and ISBN) along with the due back dates. I'm struggling , when looking at https://api.koha-community.org/21.11.html, to see how this could be done without using lots of API calls. Would I have to do something like the following:


* Call /checkouts to get a list of checkouts from the patron
* Iterate over the checkout_id and call /checkouts/$id for each checkout
* I cannot see any Biblio references in the returned data, so I'd have to then grab the biblio_id from the /items/$id endpoint and then call the /biblios endpoint to get the actual bibliographic data.

If the patron had 10 items out this would be at least 30 calls to get the bib data. Is that what I would have to do, or am I missing something - like a header or extra query which would return all the info I require from the first endpoint call?

Any advice/pointers would be much appreciated!!

Cheers, Stephen

--------------------------------------
Stephen Graham
Library Technology Consultant
Library and Computing Services

University of Hertfordshire
Hatfield, Hertfordshire, AL10 9AB

Email: s.graham4@herts.ac.uk<mailto:s.graham4@herts.ac.uk>
Website: herts.ac.uk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220712/2ae801fe/attachment-0001.htm>

------------------------------

Message: 2
Date: Tue, 12 Jul 2022 16:14:54 +0200
From: Arthur <arthur.suzuki@biblibre.com>
To: koha-devel@lists.koha-community.org
Subject: Re: [Koha-devel] Checkouts API Question
Message-ID: <25098859-8d62-d886-9a56-87eb0311ba7b@biblibre.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hi Stephen,

Although it's quite old, the ILS-DI interface is still available in 21.11.

You can check the GetPatronInfo with "show_loans=1" parameter (perhaps
by default?) to get the loans.

Then you also get bibliographic information about those loans in one API
call.

However, ILS-DI is not secure by design, there is no authentication,
which means, when you activate ILS-DI it is open to everyone to get
personnal information on any of your patrons by scraping with random
biblionumber, just be aware of this a put decent security (we use IP
restriction which is not ideal but minimum required IMO)

Best,

Arthur Suzuki

Developper @BibLibre

On 12/07/2022 16:06, Stephen Graham wrote:
>
> Hi All – we are on 21.11, and would like to include patron account
> data in our bespoke University mobile app. I was planning on using the
> RESTful API to get the data. What we would like is simply a list of
> titles (plus author and ISBN) along with the due back dates.  I’m
> struggling , when looking at
> https://api.koha-community.org/21.11.html, to see how this could be
> done without using lots of API calls. Would I have to do something
> like the following:
>
> * Call /checkouts to get a list of checkouts from the patron
> * Iterate over the checkout_id and call /checkouts/$id for each checkout
> * I cannot see any Biblio references in the returned data, so I’d
> have to then grab the biblio_id from the /items/$id endpoint and
> then call the /biblios endpoint to get the actual bibliographic data.
>
> If the patron had 10 items out this would be at least 30 calls to get
> the bib data. Is that what I would have to do, or am I missing
> something – like a header or extra query which would return all the
> info I require from the first endpoint call?
>
> Any advice/pointers would be much appreciated!!
>
> Cheers, Stephen
>
> --------------------------------------
>
> Stephen Graham
>
> Library Technology Consultant
>
> Library and Computing Services
>
> University of Hertfordshire
>
> Hatfield, Hertfordshire, AL10 9AB
>
> Email: s.graham4@herts.ac.uk <mailto:s.graham4@herts.ac.uk>
>
> Website: herts.ac.uk
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel@lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website :https://www.koha-community.org/
> git :https://git.koha-community.org/
> bugs :https://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220712/e92bad71/attachment.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


------------------------------

End of Koha-devel Digest, Vol 200, Issue 14
*******************************************


NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.