[Koha-devel] User Import Question and RESTful API

Stephen Graham s.graham4 at herts.ac.uk
Thu Apr 27 13:10:38 CEST 2023


Hi All - we have a custom user import script* which was developed by our hosting company (Hi PTFS)  way back in 2015 when we first started using Koha. Over the years I have updated it and added new functionality as things have changed. I'm just in the process of testing the script on 22.11 which we'll be moving to in June.  I'm getting an error telling me that the GetDebarments** method has been removed from Koha::Patron::Debarments. Looking at:

https://git.koha-community.org/Koha-community/Koha/commit/7c1ffd2b11501fdcedb8e7dd2e2838283c847ede

I can see that I can get the debarment info from the Patron restrictions method. I can make that change, changes like this are not uncommon with an upgrade as the Kohe code is developed.  However, I was wondering if I should start using the Restful API to do this importing. Get "with it" so to speak! Looking at the API spec:

https://api.koha-community.org/22.11.html

I can see endpoints for adding, deleting and updating patrons, but cannot see any for doing the same with restrictions. Am I missing something / looking in the wrong place? Or maybe an endpoint for this does not exists yet?

Cheers, Stephen

*  We receive user files  on the Koha server from our central IDM system every 20 mins. There is an XML file for each user create, update and deletion. The script runs every 20 mins and processes these files.
** We currently do not delete delete user records, but we add a "manual" restriction to their record  with a comment like "deleted by XML feed", and if the user comes back then we remove the restriction when we update.

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

University of Hertfordshire
Hatfield, Hertfordshire, AL10 9AB

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20230427/5f879236/attachment.htm>


More information about the Koha-devel mailing list