[Koha-devel] REST api: some needed changes / vote proposal

Tomas Cohen Arazi tomascohen at gmail.com
Wed Dec 6 16:13:13 CET 2017


Hi everyone, we've moved forward with the REST api devs, and some decisions
we made at the beginning should be dealt with now, before it is too late :-D

Right now the so-called REST api consists in 5 endpoints.

Vendors:
- /acquisitions/vendors
- /acquisitions/vendors/{vendor_id}
Cities:
- /cities
- /cities/{cityid}
Holds:
- /holds
- /holds/{reserve_id}
Patrons:
- /patrons
- /patrons/{borrowernumber}
Illrequests:
- /illrequests

When implementing the vendors endpoint, I followed the api first approach,
which implies we first think of the api itself, and how it is going to be
used, and then think about the implementation. The result is that the
exposed attribute names don't match the DB columns (because we picked more
meaningful names), and (for example) unused attributes aren't even exposed.

When it comes to the previously integrated endpoints, they mostly mimick
the DB structure and thus the external api consumers see things that are
highly inconsistent:

We call them holds, but the ID is reserve_id instead of just hold_id, same
for borrowernumber instead of patron_id.

New endpoints are being developed with this in mind, but the already
implemented ones need to get fixed. As the REST api is already at its first
stages I suggest we just change those attributes and notify on the release
notes about the change, but it is worth being voted. So I added it to
next's dev meeting agenda. It is an urgent decision, as some of fields that
would be renamed, are FK for the new endpoints being developed.

I hope everyone interested on this gets involved in the discussion on this
thread, and we can move forward just voting on the dev meeting.

Thanks in advance!
-- 
Tomás Cohen Arazi
Theke Solutions (https://theke.io <http://theke.io/>)
✆ +54 9351 3513384
GPG: B2F3C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20171206/4030370f/attachment.html>


More information about the Koha-devel mailing list