[Koha-bugs] [Bug 13607] Patron management API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 22 12:38:42 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13607

--- Comment #6 from Robin Sheat <robin at catalyst.net.nz> ---
(In reply to Jonathan Druart from comment #3)
> Hi Robin,
> Did you have a look at koha-restful?
> It seems it does the same job as this patch.
> 
> https://git.biblibre.com/biblibre/koha-restful

I didn't because I didn't see it in koha, so I didn't really know it existed or
what it could do.

(In reply to Martin Renvoize from comment #4)
> Use POST for the create operation only
> Use PUT for the update operation (possibly with your current implementation
> in here 'update or create'

You don't always know if you're creating or updating from a membership
management system thing. Hence upsert. Which is a word, look in wikipedia :)

> use DELETE for the delete operation only
> use GET for retrieving patron records
> use json (or xml) bodies to actually move the data around..

Some of these verbs are (I think, though I haven't checked) harder to use from
a browser.

> The above would bring us much more in line with the rest of the modern
> world.  Parsing XML is hard in the browser, and such an API should be
> designed for maximum flexibility, i.e to be simply used in as many
> environments as possible.. including the browser.

a) if you use things like DELETE and PUT, IIRC they're hard to use from a
browser (I might be wrong, that used the be the case though),
b) with the changes I added to C4::Service you can add switching to JSON easily
... but then you still need XML to authenticate. It's silly to mix technologies
like that (even though they are already mixed, at least you can do user
management using all one thing),
c) the intention of this isn't really to work from a browser, but to add
integration to things like salesforce that manage users.

(In reply to Martin Renvoize from comment #5)
> Also... have you seen Jesse's work on Koha::Service?
> 
> https://github.com/pianohacker/koha/commit/
> 40908d6e58c40e6ffaa488266a70ef5233fe9642

I hadn't, again, it's not in Koha so I didn't know it existed. At a (very
quick) glance, it looks to be a definite improvement over the original
C4::Service, but as it is, too much stuff is being crammed into C4::Service. My
first impression of that is that it needs to be split up.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list