]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/admin/ebook_api.adoc
Docs: Improve warning format in ebook api section
[Evergreen.git] / docs / admin / ebook_api.adoc
1 Ebook API integration
2 ---------------------
3
4 Evergreen supports integration with third-party APIs provided by OverDrive and
5 OneClickdigital.
6
7 When ebook API integration is enabled, the following features are supported:
8
9  * Bibliographic records from these vendors that appear in your
10 public catalog will include vendor holdings and availability information.
11  * Patrons can check out and place holds on OverDrive and OneClickdigital ebook
12 titles from within the public catalog. 
13  * When a user is logged in, the public catalog dashboard and My Account
14 interface will include information about that user's checkouts and holds for
15 supported vendors.
16
17 WARNING: The ability to check out and place holds on ebook titles is an experimental
18 feature in 3.0.  It is not recommended for production use without careful
19 testing.
20
21 For API integration to work, you need to request API access from the
22 vendor and configure your Evergreen system according to the instructions
23 below.  You also need to configure the new `open-ils.ebook_api` service.
24
25 This feature assumes that you are importing MARC records supplied by the
26 vendor into your Evergreen system, using Vandelay or some other MARC
27 import method.  This feature does not search the vendor's online
28 collections or automatically import vendor records into your system; it
29 merely augments records that are already in Evergreen.
30
31 A future Evergreen release will add the ability for users to check out
32 titles, place holds, etc., directly via the public catalog.
33
34 Ebook API service configuration
35 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 This feature uses the new `open-ils.ebook_api` OpenSRF service.  This
37 service must be configured in your `opensrf.xml` and `opensrf_core.xml`
38 config files for ebook API integration to work.  See
39 `opensrf.xml.example` and `opensrf_core.xml.example` for guidance.
40
41 OverDrive API integration
42 ~~~~~~~~~~~~~~~~~~~~~~~~~
43 Before enabling OverDrive API integration, you will need to request API
44 access from OverDrive.  OverDrive will provide the values to be used for
45 the following new org unit settings:
46
47   * *OverDrive Basic Token*: The basic token used for API client
48     authentication.  To generate your basic token, combine your client
49     key and client secret provided by OverDrive into a single string
50     ("key:secret"), and then base64-encode that string.  On Linux, you
51     can use the following command: `echo -n "key:secret" | base64 -`
52   * *OverDrive Account ID*: The account ID (a.k.a. library ID) for your
53     OverDrive API account.
54   * *OverDrive Website ID*: The website ID for your OverDrive API
55     account.
56   * *OverDrive Authorization Name*: The authorization name (a.k.a.
57     library name) designated by OverDrive for your library.  If your
58     OverDrive subscription includes multiple Evergreen libraries, you
59     will need to add a separate value for this setting for each
60     participating library.
61   * *OverDrive Password Required*: If your library's OverDrive
62     subscription requires the patron's PIN (password) to be provided
63     during patron authentication, set this setting to "true."  If you do
64     not require the patron's PIN for OverDrive authentication, set this
65     setting to "false."  (If set to "true," the password entered by a
66     patron when logging into the public catalog will be cached in plain text in
67     memcached.)
68   * *OverDrive Discovery API Base URI* and *OverDrive Circulation API
69     Base URI*: By default, Evergreen uses OverDrive's production API, so
70     you should not need to set a value for these settings.  If you want
71     to use OverDrive's integration environment, you will need to add the
72     appropriate base URIs for the discovery and circulation APIs.  See
73     OverDrive's developer documentation for details.
74   * *OverDrive Granted Authorization Redirect URI*: Evergreen does not
75     currently support granted authorization with OverDrive, so this
76     setting is not currently in use.
77
78 For more information, consult the
79 https://developer.overdrive.com/docs/getting-started[OverDrive API
80 documentation].
81
82 To enable OverDrive API integration, adjust the following public catalog settings
83 in `config.tt2`:
84
85   * `ebook_api.enabled`: set to "true".
86   * `ebook_api.overdrive.enabled`: set to "true".
87   * `ebook_api.overdrive.base_uris`: list of regular expressions
88     matching OverDrive URLs found in the 856$9 field of older OverDrive
89     MARC records.  As of fall 2016, OverDrive's URL format has changed,
90     and the record identifier is now found in the 037$a field of their
91     MARC records, with "OverDrive" in 037$b.  Evergreen will check the
92     037 field for OverDrive record identifiers; if your system includes
93     older-style OverDrive records with the record identifier embedded in
94     the 856 URL, you need to specify URL patterns with this setting.
95
96 OneClickdigital API integration
97 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98 Before enabling OneClickdigital API integration, you will need to
99 request API access from OneClickdigital.  OneClickdigital will provide
100 the values to be used for the following new org unit settings:
101
102   * *OneClickdigital Library ID*: The identifier assigned to your
103     library by OneClickdigital.
104   * *OneClickdigital Basic Token*: Your client authentication token,
105     supplied by OneClickdigital when you request access to their API.
106
107 For more information, consult the
108 http://developer.oneclickdigital.us/[OneClickdigital API documentation].
109
110 To enable OneClickdigital API integration, adjust the following public catalog
111 settings in `config.tt2`:
112
113   * `ebook_api.enabled`: set to "true".
114   * `ebook_api.oneclickdigital.enabled`: set to "true".
115   * `ebook_api.oneclickdigital.base_uris`: list of regular expressions
116     matching OneClickdigital URLs found in the 859$9 field of your MARC
117     records.  Evergreen uses the patterns specified here to extract
118     record identifiers for OneClickdigital titles.
119
120 Additional configuration
121 ~~~~~~~~~~~~~~~~~~~~~~~~
122 Evergreen communicates with third-party vendor APIs using the new
123 `OpenILS::Utils::HTTPClient` module.  This module is configured using
124 settings in `opensrf.xml`.  The default settings should work for most
125 environments by default, but you may need to specify a custom location
126 for the CA certificates installed on your server.  You can also disable
127 SSL certificate verification on HTTPClient requests altogether, but
128 doing so is emphatically discouraged.