Search API POST Method

Follow

Note: If your institution's account has moved to the new Infobase Platform, please visit our new Help Center for the most up-to-date documentation and support.


 
This option does not disable the current methods of access, and adds forms as an acceptable data source.
The forms also adds two normally hidden options: An AssetType filter and a test version of a SortBy filter.

The form fields have much fewer restrictions on them and accept special characters normally excluded or filtered out of a query string. Using the forms can eliminate the variable character restrictions.

Below describes the fields for each API call; all support GET and POST. If a query string is mixed with the Form fields, the query string value is dominant.
  Base URL
Databases api.infobase.com/search.ashx
Streaming Video api.infobase.com/msearch.ashx
eBooks api.infobase.com/bsearch.ashx
Media api.infobase.com/msearch.ashx

The following Form fields are valid, and field name is case-sensitive:
Form Fields Description
AccountID Customer Account ID
VendorID Service Provider ID
ProductIDs a list of productid or 0, comma-separated
SearchTerm a search term or blank to get all items
Format formats xml,xml-file,xml-zip,json,json-file,json-zip
   
Optional:  
rows=10 optional, # of rows can be excluded if all rows desired
start=0 optional, start row #, 0 is default
AssetType optional, query just this asset type
Segment optional, true/false, typically false, returns a lot of segment details) (media only)
Skipproxy optional: exclude any enduser proxy settings from URI
SortBy optional: a sort by function under test
txtmode=true optional: return grade levels (streaming video only)
 

Examples

Using curl.exe

curl -X GET \
http://api.infobase.com/ search.ashx  \
-H 'Postman-Token: 3c59bc5e-4a38-4dcd-8490-38f2bab4fbd9' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F AccountID={client account #} \
-F VendorID={your Vendor ID} \
-F ProductIDs=8 \
-F SearchTerm=bus%C8 \
-F format=xml \
-F rows=10 \
-F txtmode=true\
-F start=0 \

Using an AJAX JavaScript call;

var form = new FormData();
form.append("AccountID", "{client account #]}");
form.append("VendorID", "{your Vendor ID} ");
form.append("ProductIDs", "8");
form.append("SearchTerm", "bus%C8");
form.append("format", "xml");
form.append("rows", "10");
form.append("start", "0");
form.append("segment", "true");
form.append("txtmode", "true");

var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.infobase.com /msearch.ashx",
"method": "POST",
"headers": {
"cache-control": "no-cache",
"Postman-Token": "3ed6e663-0359-4477-9b0b-b4e54f35eb51"
},
"processData": false,
"contentType": false,
"mimeType": "multipart/form-data",
"data": form
}

$.ajax(settings).done(function (response) {
console.log(response);
});


POSTMAN can be used to test the above calls.