[Koha-bugs] [Bug 13799] Add base for building RESTful API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 13 22:27:10 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13799

--- Comment #43 from Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no> ---
Created attachment 39161
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39161&action=edit
Bug 13799: Add Swagger UI documentation

Move all API stuff into /api/v1 (except for Perl modules).
So we have:
  /api/v1/script.cgi     CGI script
  /api/v1/swagger.json   Swagger specification
  /api/v1/doc            Swagger UI

Add a virtual host in Apache configuration api.HOSTNAME
So we have:
  http://api.HOSTNAME/v1/swagger.json   Swagger specification
  http://api.HOSTNAME/v1/doc            Swagger UI
  http://api.HOSTNAME/v1/{path}         API endpoint

To test, you need to:
  1/ perl Makefile.PL
  2/ make && make install
  3/ Change etc/koha-httpd.conf and copy it to the right place if needed
  4/ Reload Apache
  5/ Go to http://api.HOSTNAME/v1/doc and check everything works
  6/ Also check that http://api.HOSTNAME/v1/borrowers and
     http://api.HOSTNAME/v1/borrowers/{borrowernumber} works

Optionally, you could verify that http://api.HOSTNAME/vX/borrowers
(where X is an integer greater than 1) returns a 404 error

For the new vhost to work, you may need to modify your /etc/hosts file
if you run Koha locally.

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


More information about the Koha-bugs mailing list