Bug 17030: Enable REST api on packages
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 4 Aug 2016 14:39:25 +0000 (11:39 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Mon, 8 Aug 2016 13:17:34 +0000 (13:17 +0000)
commit6e38b8b60f118c0721a52fdaa332446063657dd3
treea71b6298fb22bc98756d61e81762acfcfdc88b93
parent30474a321575ffecfd4e2578dce59385267ec8d7
Bug 17030: Enable REST api on packages

This patch enables access to the REST API endpoint on packages setup.
It does so, by patching the shared apache-shared-intranet.conf and
apache-shared-opac.conf.

You can build your own master packages with this patch applied, or just:

- Grab
  debian/templates/apache-shared-intranet.conf
  debian/templates/apache-shared-opac.conf
and overwrite their counterparts in /etc/koha on a packages setup. For example
in kohadevbox.
- Have Koha loaded with all default data
- Create a superlibrarian user for you
- Login to the intranet and the OPAC
- Point your browser to:
  http://localhost:8080/api/v1/patrons/51
=> SUCCESS: You get JSON data, for the patron you requested
  http://localhost:8081/api/v1/patrons/51
=> SUCCESS: You get JSON data, for the patron you requested
- Sign off :-D

Note: I use the HTTPRequester addon for Firefox, re-using the CGISESSID value from the
browser session cookie, in the headers.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
debian/templates/apache-shared-intranet.conf
debian/templates/apache-shared-opac.conf