The PublicationIQ service provides the ability to search for publications designated as a part of a customer's collection. 

 

 

 

 

Get All Packages Code Samples

Use the code samples below as examples to create an application in your desired language.  The following code samples use the /{profile}/allpackages endpoint which allows you to retrieve a list of packages from EPKB limited to a single customer ID.  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 --header 'Accept: application/json' 'https://sandbox.ebsco.io/pf/pfaccount/PROFILE/allpackages'

Java

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

// Create the URL
HttpUrl url = new HttpUrl.Builder()
    .scheme("https")
    .host("sandbox.ebsco.io")           
    .addPathSegment("pf")
    .addPathSegment("pfaccount")
    .addPathSegment(PROFILE)
    .addPathSegment("allpackages")
    .build();

// Build the request
Request request = new Request.Builder()
    .url(url)
    .get()
    .addHeader("accept", "application/json")
    .build();

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



JavaScript

var host = "https://sandbox.ebsco.io/pf/pfaccount/";
var pathsega = "/allpackages";

var PROFILE = "PROFILE";

// Create the Request
var urlstr = host + PROFILE + pathsega;
var settings = {
  "async": true,
  "crossDomain": true,
  "url": urlstr,
  "method": "GET",
  "headers": {
    "accept": "application/json"
  }
}

// Send the Request
$.ajax(settings).done(function (response) {
  console.log(response);
  $('.screen').html(JSON.stringify(response)).fadeIn();
});
Ruby

# Form the URL 
urlstr = File.join('https://sandbox.ebsco.io', 'pf', 'pfaccount', PROFILE, 'allpackages')
uri = URI(urlstr)

# 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'

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

Python

# Form the URL
url = ''.join(['/pf','/pfaccount/', PROFILE, '/allpackages'])

# Create Connection Instance
conn = http.client.HTTPSConnection("sandbox.ebsco.io")

# Create the Request Headers
headers = {
    'accept': "application/json"
    }

# Send Request  
conn.request("GET", url, headers=headers)

# Get Response
res = conn.getresponse()
data = res.read()