Bug 16652

Summary: Omnibus: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers
Product: Koha Reporter: Michal Denar <black23>
Component: REST APIAssignee: Bugs List <koha-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P1 - high CC: arthur.suzuki, black23, dcook, ere.maijala, jonathan.druart, josef.moravec, lari.taskula, mail, tmisilo, tomascohen, veron
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13930
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30962
Change sponsored?: Sponsored Patch complexity: Large patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 16826, 13895, 13903, 13927, 14868, 15165, 16202, 16330, 16497, 16699, 16825, 17003, 17004, 17005, 17006, 17007, 17314    
Bug Blocks:    
Deadline: 2016-08-31   
Attachments: Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers

Description Michal Denar 2016-06-03 18:56:00 UTC

    
Comment 1 Josef Moravec 2016-06-08 05:43:03 UTC
This bug is just omnibus. We would like to base our new Koha driver for VuFind on RESTful API and to rewrite driver for xcnciptoolkit using this API too. These drivers has many functions so we need the API to be heavily extended.
Comment 2 Jiri Kozlovsky 2016-06-28 12:35:16 UTC
The extensions we need for xcncip2toolkit:

Authenticate user's credentials
 - can this be done using API?

Retrieve user's personal information (bug #16330 - Signed off at the moment)
 - email, firstname, lastname, middlename, street, city & distinction between employee/reader for providing the user's identity to a simpleSAMLphp xcncip2 module (https://github.com/moravianlibrary/SimpleSAMLphp-modules/tree/master/modules/xcncip2) & for showing the profile in VuFind
 - also user's blocks and traps  (called debarred in Koha) would be useful

Retrieve, create & cancel user's holds (bug #13903 - Pushed to master)
 - within the retrieval we need the hold queue length for each hold

Retrieve & renew user's checkouts/issues (bug #13895 - Failed QA)
 - we need to include the renewability to prevent user from being denied while trying to renew

Retrieve user's checkouts history with pagination support (no bug yet)

Retrieval of user's accounlines (bug #15165 - In discussion)

Retrieve items & biblios - especially availability & current location
 - it also would be nice to include the requestability to currently logged in user in VuFind somehow to prevent user from being denied while trying to borrow
Comment 3 Jiri Kozlovsky 2016-08-02 01:43:50 UTC Comment hidden (obsolete)
Comment 4 Jiri Kozlovsky 2016-08-03 12:28:52 UTC Comment hidden (obsolete)
Comment 5 Jiri Kozlovsky 2016-08-03 12:38:53 UTC
Created attachment 53943 [details] [review]
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers

Actualized included bugs.
Comment 6 Lari Taskula 2016-08-19 11:06:31 UTC
A little advertisement if you don't mind... I recommend checking out Bug 16212, Bug 16699 and Bug 14868 because they make Swagger more maintainable as new operations are introduced, fix problems with our spec being actually valid against Swagger schema and also enable our spec to be used with Swagger-UI (which is awesome), and introduce required permissions for an operation directly in Swagger instead of having them (hidden) inside controllers. If possible it would be nice to have sign-offs for them ASAP because as API grows larger, it will be more and more annoying to rebase those 3 bugs on master.

Thank you!
Comment 7 Lari Taskula 2016-08-19 11:08:49 UTC
We have also rebased these bugs on top of master, see our API in our test server at http://renki.pohjoiskarjala.net/api/v1/doc with Swagger-UI.
Comment 8 Jiri Kozlovsky 2016-09-18 09:47:30 UTC
Created attachment 55642 [details] [review]
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers

Fixed checkout endpoint for null itemnumbers & renamed "borrowers" tags
to "patrons"

Note that this patch is about to be used with the current Koha stable
version, which has not implemented Bug 16202, Bug 16699 and Bug 14868 just yet.

We want to be capable of patching the stable so that it can contain all
the services needed with basically zero-effort.

Lari: I hope those patches are going to be backported to current stable
soon so that we don't have to do this hassle. And, the Swagger-UI is
quite awesome! :)
Comment 9 Jiri Kozlovsky 2016-09-18 10:28:16 UTC
Created attachment 55647 [details] [review]
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers

Added auth endpoint

Note that this patch is about to be used with the current Koha stable
version, which has not implemented Bug 16202, Bug 16699 and Bug 14868 just yet.




Current depends: 13895 13903 13927 14868 15165 16202 16699 16330 16497 16825 16826 17003 17004 17005 17006 17007
Comment 10 Jiri Kozlovsky 2016-09-18 10:30:07 UTC
Updated dependecies
Comment 11 Jiri Kozlovsky 2016-09-18 11:24:53 UTC
Created attachment 55651 [details] [review]
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers

Added renewability endpoint

Note that this patch is about to be used with the current Koha stable
version, which has not implemented Bug 16202, Bug 16699 and Bug 14868 just yet.
Comment 12 Jiri Kozlovsky 2016-09-18 11:35:53 UTC
Created attachment 55652 [details] [review]
Bug 16652: RestfulAPI supporting services for Vufind and for xnciptoolkit drivers

Fixed availability endpoint

Note that this patch is about to be used with the current Koha stable
version, which has not implemented Bug 16202, Bug 16699 and Bug 14868 just yet.
Comment 13 Jiri Kozlovsky 2016-09-18 15:01:24 UTC
We also want to have the API for manipulating suggestions implemented, so I've included Bug 17314 to dependecies.
Comment 14 Tomás Cohen Arazi 2016-09-18 15:41:50 UTC
I'd like to mention that having such a big patch won't help this work get into master. You need to split it into several smaller units, that can be tested on their own, and have precise instructions so you find people willing to sign this work.
Comment 15 Jiri Kozlovsky 2016-09-18 15:56:40 UTC
(In reply to Tomás Cohen Arazi from comment #14)
> I'd like to mention that having such a big patch won't help this work get
> into master. You need to split it into several smaller units, that can be
> tested on their own, and have precise instructions so you find people
> willing to sign this work.

Yes, I know that. All those patches actually exists already - those are the dependency bugs. This is just omnibus which should not have an implementation on it's own.

The purpose of the only one attachment here is to easily perform one patch on a stable version of Koha in order to implement all the dependency patches at once. We do that because the bugs are changing their structure due to changes in swagger implementation but we still want those bugs to function on stable version of Koha (currently 16.05.x) as there probably won't be backported the newest swagger implementation
Comment 16 Tom Misilo 2018-02-02 13:13:06 UTC
Hi, I tried finding it, but is there going to be routes for Course Reserves? 

For example something that would return the courses, the instructors, and departments? And then something that would find the items that belong to each of the above?

Thanks!
Comment 17 Tomás Cohen Arazi 2018-02-02 13:19:50 UTC
(In reply to Tom Misilo from comment #16)
> Hi, I tried finding it, but is there going to be routes for Course Reserves? 
> 
> For example something that would return the courses, the instructors, and
> departments? And then something that would find the items that belong to
> each of the above?
> 
> Thanks!

You should add an entry (or set of entries) on the RFCs page:
https://wiki.koha-community.org/wiki/REST_api_RFCs

And then ask people to comment or do their counter proposals for an eventual vote on a dev meeting.

I'll try to keep an eye on it, keep me informed.
Comment 18 Josef Moravec 2023-08-09 09:14:00 UTC
This patch is abandoned, rest api in Koha is moving forward and such an omnibus patch does not makes sense anymore.