API Usage

To use the IRIS API send all requests to the endpoint http://iris.comminfo.rutgers.edu. A POST request should be sent with the parameter xmldata set to your all of your XML data. The request formats are described on the GitHub Documentation.

An Example

To get a feel for how the API works, let's try sending an example request. Let's look at the following request for extracting the most frequent words from a web page:

Example Request

<parameters>
	<requestType>extract</requestType>
	<numWords>10</numWords>
	<resourceList>
		<resource>
			<id>1</id>
			<url>http://www.westegg.com/bacon/marriage.html</url>
		</resource>
	</resourceList>
</parameters>

You can send this request using our requester tool. The requester will output the XML in a collapsable tree for easy viewing.

Another way you can send this is by using Curl. If you save the request text as example.xml you can send it using the command:

curl iris.comminfo.rutgers.edu -d "xmldata=$( < example.xml)"

This request fetches the 10 most frequent words in the document.

If you did not notice, the API response includes the node <clientID>1</clientID>. This is the default client id when it is unspecified. To get your own private client id, see the registration section below.

Registration

IRIS is intended to be completely free and open. Ideally, no registration would be necessary in any case. However, if you wish to keep your data safe, we offer the option of registering your web application and obtaining a fixed private client id.

This kind of authentication is per website. Therefore, if you register your website, all API calls must come from that website. This way, no passwords or keys are needed.

If you wish to obtain a private client id, please register with this link.

Further Information

If you are interested in using IRIS, we suggest starting with the GitHub Documentation to see the different operators available and the XML request formats.

The documentation also provides information for altering IRIS if you wish to use it as a starting point for your own Information Retrieval System.