Skip to content

Configuration

Madeline Dale edited this page Aug 5, 2020 · 8 revisions

Configuration

EDS API Profile

You'll need to have an EDS API profile in EBSCOadmin. You can request this at eds@ebscohost.com, or you can create a new EDS API profile yourself using the Profile Maintenance feature.

Be sure you add content to your EDS API profile (via the Databases tab) so it will return results.

Authentication

An EDS API session requires authentication. There are two methods available and both are configured in EBSCOadmin:

1. IP address

  • Use this if you plan to access the API from server(s) with a fixed IP address, or via a proxy server.
  • Create and manage IP address lists in the top-level Authentication tab at the top of the EBSCOadmin screen and select the IP Address sub-tab.

2. User ID and password

  • Use this if you might connect to the API from machines outside your network, or from many different addresses.
  • Create a user ID and password to access your API profile in the Authentication tab at the top of the EBSCOadmin screen. Make sure the Group associated with the login you create is the group that contains your EDS API profile.

EBSCO Support (eds@ebscohost.com) can help you set up an EDS API profile and get a userID and password for it if you are unfamiliar with EBSCOadmin.

Session

You can configure the EDS session in two ways:

1. Using environment variables

EDS_PROFILE=profile_name
EDS_GUEST=n
EDS_USER=your_user_id
EDS_PASS=secret
EDS_AUTH=ip
EDS_ORG=your_institution

Once set, you create a session like this:

session=EBSCO::EDS::Session.new

2. Using an options hash

session=EBSCO::EDS::Session.new({:profile=>'eds-api', :
:user=>'your_user_id',:pass=>'secret',:guest=>false,:org=>'my organization'})

Default configuration options

NameDescriptionDefault Value
debugProduce debug messages & log connection traffic (see log below). Either true or false.false
logLog for connection traffic produced by faradayfaraday.log
guestEDS guest mode. Either true or falsefalse
orgYour organization, company or institution.''
authAuthentication method. Either 'user' or 'ip'user
auth_tokenAuthentication token.''
session_tokenSession token.''
api_hosts_listExplicit list of API hosts. Can be used to limit to specific clusters.'['eds-api.ebscohost.com']'
uid_auth_urlUser ID authentication endpoint./authservice/rest/uidauth
ip_auth_urlIP authentication endpoint./authservice/rest/ipauth
create_session_urlCreate session endpoint./edsapi/rest/CreateSession
end_session_urlEnd session endpoint./edsapi/rest/EndSession
info_urlInfo endpoint./edsapi/rest/Info
search_urlSearch endpoint./edsapi/rest/Search
retrieve_urlRetrieve record endpoint./edsapi/rest/Retrieve
citation_exports_url Citation export endpoint./edsapi/rest/ExportFormat
citation_exports_formats List of export formats to offer.all
citation_styles_url Citation styles endpoint./edsapi/rest/CitationStyles
citation_styles_formats List of citation style formats to offer.all
user_agentUser-Agent HTTP header.EBSCO EDS GEM v0.0.1
interface_idApplication that you are performing user authentication for.edsapi_ruby_gem
max_attemptsMaximum retries for failed EDS API requests.2
max_results_per_pageMaximum number of results to display per result page.100
ebook_preferred_formatPreferred ebook format. Either ebook-pdf or ebook-epub.ebook-pdf
use_cacheCaches the EDS Auth token (for 30 mins) and the profile's Info (1 day). Either true or false.true
eds_cache_dirDirectory to store the cache.ENV['TMPDIR'] or '/tmp'
smarttext_failoverWill rerun a search using SmartText search mode if no results were foundfalse

Note: any or all of these default configuration values can be changed:

1. Specify another value using the options hash:

session=EBSCO::EDS::Session.new({:debug=>true,:log=>'eds-connection.log',:profile=>'eds-api', :
:user=>'your_user_id',:pass=>'secret',:guest=>false,:org=>'my organization'})

2. Specify a configuration yaml file via :config:

session=EBSCO::EDS::Session.new({:config=>eds-config.yaml,:profile=>'eds-api', :
:user=>'your_user_id',:pass=>'secret',:guest=>false,:org=>'my organization'})

Clone this wiki locally