The Representational State Transfer (REST) API for Focal Point is a RESTful interface through which you can access, create and update Focal Point resources.
To understand and use the RESTful API, you must be familiar with the REST principles and with HTTP, XML, and the XML Schema.
This information is also available in PDF format, see:
The RESTful API for Focal Point is a provisional API. It is not for production use and can change at any time.
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. The RESTful API examples are available in fpinstall\apiexamples\RESTAPIExample.zip. An administrator (who has access to the application server on which Focal Point is 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.
Setup
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 threaded 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.
Resources overview
The REST XML resources in Focal Point are service, element collections, element and attributes.These are the resource types and example REST API URIs for the resources:
Resource type
Example REST API URI
Description
Supported REST operations
Service document
http://fpserver/fp/resources/
The service document has the high level resources for workspace, module, views that a user has access to.
The XML representations of Focal Point resources can be linked to other resources by using the XML element link. The link is similar to the link in the Atom format.