The Representational State Transfer (REST) API for Focal Point® is a RESTful interface through which you can access, create and update Focal Point® resources.
The server name part of the resource URI can be configured in the Login or Balancer URL page.
To specify the server name for the resource URI, in Focal Point®, from the User menu, select Administration. On the Administration page, click Application > Login Page; under Login Page Settings, click the Edit icon for Login or Balancer URL, specify the URL, and click the Save icon.
Note Make sure that the host name or the server name does not change. A change in the host name can lead to broken links in Focal Point® integrated systems that link to the Focal Point® resources.
Authentication
The requests to the RESTful API must be authenticated by using HTTP basic authentication. Unless you use HTTPS authentication, the user name and password are sent without encryption.
In HTTP basic authentication, character encoding is not specified for user names and passwords. User names and passwords can include ASCII characters only. You might be able to use ISO-8859-1 characters if the characters are encoded by the client correctly.
Character encoding
The XML information that is retrieved from Focal Point® uses UTF-8 character encoding.
For XML that is sent to Focal Point®, the charset of the Content-Type HTTP header is used, if present. Else, the encoding that is specified in the XML prolog is used. If no prolog is present, the default for the XML is used. The encoding that is used must match any declared encoding. You can use UTF-8 encoding when you communicate with Focal Point® and specify UTF-8 encoding in the HTTP header and XML prolog.
Accessing REST XML APIs in a multi thread environment
From Focal Point® version 6.5.2.3, to access REST API in a multi threaded environment from the client applications, you must follow the these steps:
1 Use MultiThreadedHttpConnectionManager object for creating the HTTP connection object. For example:
... MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager(); client = new HttpClient(connectionManager ); ...
2 Reuse the HttpClient object from each thread to make REST API requests instead of creating a new HttpClient object for each thread.
Examples
You can refer to the REST API examples to learn how to use the APIs for Focal Point®. The examples are in Java source files that can be compiled and run.
Prerequisite
▪ Knowledge of Java and REST.
The RESTful API examples are available in Focal Point® install directory\apiexamples\RESTAPIExample.zip. An administrator having access to the application server on which Focal Point® in installed can provide you with the example package. For more information about the source files and the process to compile the code, see the readme file in the example package.