The HoldingsIQ service retrieves vendor, package and title related information in JSON format. The service automates the managing of holdings data from different sources.

 

 

 

 

Get Customer Proxies Code Samples

Use the code samples below as examples to create an application in your desired language.  The following code samples use the /{custid}/proxies endpoint which allows you to retrieve the list of all available customer proxies.  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' --header 'x-api-key: APIKEY' 'https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/proxies'


Java

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

// Create the URL
HttpUrl url = new HttpUrl.Builder()
    .scheme("https")
    .host("sandbox.ebsco.io")
    .addPathSegment("rm")
    .addPathSegment("rmaccounts")
    .addPathSegment(DUMMYCUSTID)
    .addPathSegment("proxies")
    .build();

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

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


JavaScript

var host = "https://sandbox.ebsco.io/rm/rmaccounts/";
var path = "proxies";

// Create the Request
var urlstr = host + CUSTID + path;
var settings = {
  "async": true,
  "crossDomain": true,
  "url": urlstr,
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "x-api-key": APIKEY,
  }
}

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


Ruby

PATH = "proxies"

# Form the URL 
urlstr = File.join('https://', 'sandbox.ebsco.io', 'rm/rmaccounts', DUMMYCUSTID, PATH)
url = URI(urlstr)

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

# Create the request
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["x-api-key"] = DUMMYAPIKEY

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


Python

PATH = "proxies"

# Form the URL
url = ''.join(['/rm','/rmaccounts/', DUMMYCUSTID, '/proxies'])

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

# Create the Request Headers
headers = {
    'accept': "application/json",
    'x-api-key': DUMMYAPIKEY
    }

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