<div dir="ltr">See also the previous discussion on that topic - <a href="http://lists.koha-community.org/pipermail/koha-devel/2017-March/043576.html">http://lists.koha-community.org/pipermail/koha-devel/2017-March/043576.html</a><br><div><br><div class="gmail_quote"><div dir="ltr">On Wed, 6 Dec 2017 at 12:13 Tomas Cohen Arazi <<a href="mailto:tomascohen@gmail.com">tomascohen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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<div><br></div><div>Right now the so-called REST api consists in 5 endpoints.</div><div><div><br></div><div>Vendors:</div><div>- /acquisitions/vendors</div><div>- /acquisitions/vendors/{vendor_id}</div><div>Cities:</div><div>- /cities<br></div><div>- /cities/{cityid}<br></div><div>Holds:</div><div>- /holds</div><div>- /holds/{reserve_id}</div><div>Patrons:</div><div>- /patrons</div><div>- /patrons/{borrowernumber}</div><div>Illrequests:</div><div>- /illrequests</div></div><div><br></div><div>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.</div><div><br></div><div>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:</div><div><br></div><div>We call them holds, but the ID is reserve_id instead of just hold_id, same for borrowernumber instead of patron_id.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Thanks in advance!</div></div><div dir="ltr">-- <br></div><div class="m_4237139966205822351gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(117,117,117);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:12.8px">Tomás Cohen Arazi</div><div style="color:rgb(117,117,117);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:12.8px">Theke Solutions (<a href="http://theke.io/" target="_blank">https://theke.io</a>)<br>✆ <a href="tel:+54%209%20351%20351-3384" value="+5493513513384" target="_blank">+54 9351 3513384</a><br>GPG: B2F3C15F</div></div></div>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a></blockquote></div></div></div>