About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
configuration:ils:examples:koha_rest_plugin

This is an old revision of the document!


Installing and Configuring Koha's REST Plugin

Thanks to Mohan Pradhan for developing this documentation.

Prerequisite

These instructions assume that you have already installed Koha version 22.05 and Mariadb 10.5.* The Koha ILS is installed on one server and VuFind will be installed on another server. Alternately, both systems can be installed on one server.

Configuration at the Koha side

The RestApi plugin is used for harvesting data from Koha.

The following steps will be followed to configure the plugin at the Koha side.

Configure koha-conf.xml

1. Edit the koha-conf.xml file. It is located in the path /etc/koha/sites/<instance name>.

In our case, the instance name is pasantha. In your case, it may be different.

root@debian:/etc/koha/sites/pasantha# nano /etc/koha/sites/pasantha/koha-conf.xml

After opening the koha-conf.xml file, change the line:

<enable_plugins>0</enable_plugins>

to

<enable_plugins>1</enable_plugins>

Save the file after making this change and run the command:

sudo service apache2 restart

2. Download the plugin: https://github.com/NatLibFi/koha-plugin-rest-di/releases/download/v22.05.06/koha-plugin-rest-di-22.05.06.kpz

3. In the Koha staff interface, go to: Home→ Koha administration→ Global system preferences→ Web services and find the REST API section. By default, it is set to 'Disable.'

Set each dropdown to 'Enable' as shown below:

Upload Plugin

Go to Home → Administration and click Manage Plugins. The output will be as follows:

Click the Upload plugin button as shown above.

You will then be prompted to select a file:

Choose the file koha-plugin-rest-di-1.2.12.kpz, or the latest version, and click Upload button.

When you view the Plugins list, you will see that the REST API plugin is set as DISABLED. Go to Actions at the far right and select Enable, as shown below.

The plugin will now be ENABLED, as shown here:

If you don’t have the latest version of Koha installed, then the warning message message below will appear on your screen:

If you have the most recent version, you will not see that message.

Configuring Plack

Plack can increase the performance of Koha. Plack is included with Koha by default, but in some cases it may need to be enabled. Check your About Koha page to see if it’s running or not.

To enable Plack, enter the following commands:

sudo a2enmod headers proxy_http
sudo koha-plack --enable libraryname
sudo koha-plack --start libraryname
sudo systemctl restart apache2

Then check your About Koha page. You should see PSGI: Plack (deployment) under Server Information if Plack is running and configured correctly.

configuration/ils/examples/koha_rest_plugin.1677274348.txt.gz · Last modified: 2023/02/24 21:32 by sturkel