Warning: This page has not been updated in over over a year and may be outdated or deprecated.
configuration:ils:examples:koha_rest_plugin
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
configuration:ils:examples:koha_rest_plugin [2023/02/24 21:32] – sturkel | configuration:ils:examples:koha_rest_plugin [2023/02/27 18:53] – [Upload the Plugin] sturkel | ||
---|---|---|---|
Line 5: | Line 5: | ||
** Prerequisite ** | ** 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. | + | These instructions assume that you have already installed Koha version 22.05 in a Debian-based Linux environment. Later versions of Koha may look different from the provided screen shots, and different operating systems may have minor differences in some commands. |
+ | |||
+ | The example assumes that the Koha ILS is installed on one server and VuFind will be installed on another server. | ||
===== Configuration at the Koha side ===== | ===== Configuration at the Koha side ===== | ||
- | The RestApi plugin is used for harvesting | + | The RestApi plugin is used for accessing real-time |
The following steps will be followed to configure the plugin at the Koha side. | The following steps will be followed to configure the plugin at the Koha side. | ||
Line 41: | Line 43: | ||
</ | </ | ||
- | 2. Download the plugin: | + | 2. Download the most up-to-date .kpz plugin |
- | https:// | + | |
- | 3. In the Koha staff interface, go to: '' | + | 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 ' |
- | Set each dropdown to ' | + | Set each dropdown |
{{ : | {{ : | ||
- | ==== Upload Plugin ==== | + | ==== Upload |
- | Go to Home -> Administration | + | Go to **Home -> Administration** and click **Manage Plugins**. The output will be as follows: |
{{ : | {{ : | ||
Line 62: | Line 63: | ||
{{ : | {{ : | ||
- | Choose the file '' | + | Choose the file you downloaded earlier (the filename will be something similar to '' |
- | 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. | + | 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 |
{{ : | {{ : | ||
Line 78: | Line 79: | ||
If you have the most recent version, you will not see that message. | If you have the most recent version, you will not see that message. | ||
- | ==== Configuring | + | ==== Configure |
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. | 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: | + | To enable Plack, enter the following commands, replacing " |
<code bash> | <code bash> | ||
Line 93: | Line 94: | ||
Then check your **About Koha** page. You should see '' | Then check your **About Koha** page. You should see '' | ||
+ | ==== Configure the EnvAuthorisation setting ==== | ||
+ | Add the following line as shown below in ''/ | ||
+ | |||
+ | <code bash> | ||
+ | SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 | ||
+ | </ | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Save your change and run the command | ||
+ | |||
+ | <code bash> | ||
+ | sudo service apache2 restart | ||
+ | </ | ||
+ | |||
+ | ==== Create a Client ID and Secret Key from the Patrons area ==== | ||
+ | |||
+ | Go to: **Home -> Patrons** and select a patron. We will use patron Manu Pasantha as an example. | ||
+ | |||
+ | Go to **More -> Set Permission** and grant **Access to all library functions** to this user. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Go to **More -> Manage API keys**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Click the link to **Generate a new client id/secret pair**. Under Description, | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Once a value such as vufind is entered and saved, the system will display a Client ID and Secret key for the patron, as shown below: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Note the Client ID and Secret key; you will need these later when [[configuration: | ||
+ | |||
+ | ==== Verify whether the API is working ==== | ||
+ | |||
+ | Go to | ||
+ | |||
+ | <code bash> | ||
+ | http:// | ||
+ | </ | ||
+ | |||
+ | If successful, you will see the following heading among the others: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | If this heading is not displayed, go to **Home -> Koha administration-> | ||
+ | |||
+ | Set the **RESTOAuth2ClientCredentials** option to " | ||
+ | |||
+ | If it is already enabled, disable and save it. Then enable it again and save it. | ||
+ | |||
+ | Now recheck again by again trying to access the URL: | ||
+ | |||
+ | <code bash> | ||
+ | http:// | ||
+ | </ | ||
configuration/ils/examples/koha_rest_plugin.txt · Last modified: 2023/05/03 16:39 by demiankatz