REST prerequisites
One method of calling the Interact API is by using JSON (JavaScript Object Notation) format calls over HTTP, referred to here as the REST API. The REST API has the advantage of having better performance than SOAP, although the Java serialization adapter is still the fastest method for Interact API calls.
Before you begin using the REST API, be aware of the following:
*
http://Interact_Runtime_Server:PORT/interact/servlet/RestServlet, substituting the actual host name or IP address of the Interact runtime server and the port on which Interact is deployed.
*
There are two Interact classes specific to the REST API: RestClientConnector, which serves as a helper to connect to an Interact run time instance via REST with the format of JSON, and RestFieldConstants, which describes the underlying format of the JSON message that is used for API requests and responses.
*
A sample REST client is provided at Interact _Home/samples/javaApi/InteractRestClient.java. Although the sample code is a simple example, it should provide a good starting point for demonstrating how the REST API is used.
*
For a complete description of the REST API classes along with all other Interact API information, see the Javadoc installed on the runtime server at Interact_Home/docs/apiJavaDoc.
Other than the information mentioned here, the REST API supports all of the methods that are supported by the other protocols for using the Interact API.