The EBSCOhost Entitlement API makes research easy by providing access to full text content from EBSCOhost full text databases.

 

 

Get Full Text Links Code Samples V3

Use the code samples below as examples to create an application in your desired language.  The following code samples use the /v3/{cgp}/discovery endpoint which allows you to customize key functions of the EBSCO open link resolver to get their patrons easy access to EBSCOhost full text database content.  Get started and begin to understand the endpoint by following the examples below in the language of your choice. 

 

Code Samples

cURL

curl -X GET "https://ebscois-staging.apigee.net/ehostentitlements/v3/aws.main.eds/discovery?doi=10%2C1080%2F1470243032000214222" -H "accept: application/json" -H "token: ebd211" -H "x-forwarded-proto: https" -H "x-forwarded-host: test.ebsco.com" -H "Authorization: Bearer TOKEN"

Java

// Construct the client
OkHttpClient client = new OkHttpClient();

// Create the URL
HttpUrl url = new HttpUrl.Builder()
    .scheme("https")
    .host("ebscois-staging.apigee.net")
    .addPathSegment("ehostentitlements")
    .addPathSegment("v3")
    .addPathSegment(CGP)
    .addPathSegment("discovery")
    .addQueryParameter("doi", "10%2C1080%2F1470243032000214222")
    .build();

// Build the request
Request request = new Request.Builder()
    .url(url)
    .get()
    .addHeader("accept", "application/json")
    .addHeader("token", "edf211")
    .addHeader("x-forwarded-proto", "https")
    .addHeader("x-forwarded-host", "test.ebsco.com")
    .addHeader("Authorization", "Bearer TOKEN")
    .build();

// Send the request
Response response = client.newCall(request).execute();


JavaScript

var host = "https://ebscois-staging.apigee.net/ehostentitlements/v3/";
var pathsega = "/discovery";

// Create the Request
var urlstr = host + CGP + pathsega;
var settings = {
  "async": true,
  "crossDomain": true,
  "url": urlstr,
  "method": "GET",
  "data": { 
    "doi": "10%2C1080%2F1470243032000214222"
  },
  "headers": {
    "accept": "application/json",
    "token": "edb211",
    "x-forwarded-proto": "https",
    "x-forwarded-host": "test.ebsco.com",
    "Authorization": "Bearer TOKEN",
  }
}

// Send the Request
$.ajax(settings).done(function (response) {
  console.log(response);
});


Ruby

# Form the URL 
urlstr = File.join('https://', 'ebscois-staging.apigee.net', 'ehostentitlements', 'v3', CGP, 'discovery')
uri = URI(urlstr)

query = URI.encode_www_form({
    # Request parameters
    'doi' => '10%2C1080%2F1470243032000214222'
})
if query.length > 0
  if uri.query && uri.query.length > 0
    uri.query += '&' + query
  else
    uri.query = query
  end
end

# Create the HTTP object
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

# Create the request
request = Net::HTTP::Get.new(uri.request_uri)
request["accept"] = 'application/json'
request["token"] = 'ebd222'
request["x-forwarded-proto"] = 'https'
request["x-forwarded-host"] = 'test.ebsco.com'
request["Authorization"] = 'Bearer TOKEN'

# Send the request
response = http.request(request)


Python

# Form the URL
url = ''.join(['/ehostentitlements', '/v3', CGP, '/discovery'])

# Create Connection Instance
conn = http.client.HTTPSConnection("ebscois-staging.apigee.net")

# Set the Query Parameters
params = urllib.parse.urlencode({'doi': '10%2C1080%2F1470243032000214222'})

# Create the Request Headers
headers = {
    'accept': "application/json",
    'token': "ebd222",
    'x-forwarded-proto': "https",
    'x-forwarded-host': "test.ebsco.com",
    'Authorization': "Bearer TOKEN"
    }

# Send Request  
conn.request("GET", url + '?' + params, headers=headers)