[Koha-bugs] [Bug 17030] Configure the REST api on packages install

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 4 16:56:04 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17030

--- Comment #2 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 53992
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53992&action=edit
Bug 17030: Make REST api available on packages with plack enabled

This patch is the starting point for making the REST api available
on Plack.

What it does:
- It creates the /api/v1/app.pl mount point in plack.psgi
- It enables the ProxyPass and ProxyPassReverse directives so it
  is reached through Plack.

TODO: It is missing the rewrite part.

To test:
- Grab the following files, and put them in /etc/koha (overwrite the existing
ones)
  debian/templates/apache-shared-intranet-plack.conf
  debian/templates/apache-shared-opac-plack.conf
- Tweak your /etc/koha/sites/kohadev/plack.psgi file so the API-related stuff
  is present on your file.
- Make sure Plack is enabled for the instance:
  $ sudo koha-plack --enable kohadev
  $ sudo koha-plack --restart kohadev
  $ sudo service apache2 restart
- Follow the previous patch test plan, but use this URLs (no pretty URL for
now):

  http://localhost:8080/api/v1/app.pl/api/v1/patrons/50
  http://localhost:8081/api/v1/app.pl/api/v1/patrons/50
=> SUCCESS: You get a JSON response from the API [1]
- Sign off :-D

Note: this patch made a bug visible (the session is lost when accessing the API
through
Plack) but it shouldn't prevent its inclusion because the API right now is not
even available
as default for developers to test or fix it.

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


More information about the Koha-bugs mailing list