Posts from July 2013

Your most common usage of the I2E Web Services API is likely to be to automate query execution to generate results.

Queries themselves are always constructed and refined in the I2E client interface; from there they can be saved onto the I2E server ready for batch processing. When running a query automatically you need to provide, as a minimum, two pieces of information: the location of the index and the location of the query.

In this post we won’t worry too much about the index — we’ll assume that the index that the user originally used to create their query is still available — and focus on the query.

As saved by the user, the query contains sufficient information to specify the search itself (keywords, classes, phrases, etc.) as well as controlling the output settings, which will include (among other things) the format of the results (HTML, TSV, XML, etc) along with the ordering of results and selection of columns and highlighting.

When thinking about automating query submission, there are four use cases to consider: submit the query with no modifications; submit the query with modifications to the output settings; submit the query with modifications to the search terms in the query; and submit the query with modifications to both the output settings and the query search terms.

In each case, the query is run automatically by POSTing information (as a query template) about the query (in JSON format)  to the I2E server: the query template also contains information about the index to be searched.

The I2E server will then return some information about the query task including the status of the search and the location of the results.
 


When choosing to develop an application that uses I2E, it is important to understand the capabilities of our text mining software as well details of the API itself.


 

As the graphic shows, tasks that are performed on the I2E Server are independent of each other and so allow diverse applications to be created: one app to run large-scale queries and present the information in a visual form in one example; another app to process documents automatically and publish the resulting indexing to the I2E Query GUI is another.

Today’s post is more about the latter: what are the basic details of the API itself; what languages are supported and what do we provide to get you started.

The WSAPI is RESTful. It communicates over HTTP(S), which is good for a number of reasons, including the ability for users to easily browse resources on the I2E server, and because there are freely-available modules or libraries for creating clients in different languages, including JavaScript running in a web browser (or even the web browser itself).

So the question of “what languages are supported?” generally becomes “what languages can use an HTTP/REST interface?”.

Here is a short list of some libraries/modules that we or our customers have used in our applications to communicate with the I2E server using the WSAPI: