The Representational State Transfer (REST) API for Focal Point is a RESTful interface through which you can access, create and update Focal Point resources by using JSON data format.
This information is also available in PDF format, see:
To specify the server name for the resource URI, in Focal Point, click Application > Login Page > Login or Balancer URL and specify the appropriate value for the host name.
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 only ASCII characters. You might be able to use ISO-8859-1 characters if the characters are correctly encoded by the client.
Character encoding
The JSON information that is retrieved from Focal Point uses UTF-8 character encoding.
For JSON data that is sent to Focal Point, the charset of the Content-Type HTTP header is used (if present). Otherwise, the encoding that is specified in the JSON prolog is used. If no prolog is present, the default for the JSON data 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 JSON prolog.
Accessing JSON REST APIs in a multi threaded environment
In Focal Point version 6.5 and later, for client applications to access the REST API in a multi-threaded environment, you must follow these steps:
1 Use the MultiThreadedHttpConnectionManager object to create 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 Focal Point APIs. The examples are in Java source files that can be compiled and run.
Prerequisite
Knowledge of Java and REST.
Resources overview
The REST JSON resources in Focal Point are service, element collections, element, and attributes. The following table summarizes the resource types and example REST API URIs for the resources:
Resource type
Example REST API URI
Description
Supported REST operations
Service document
https://fpserver.com:9443/fp/resources/
The service document has the high level resources for the workspace, module, views that a user has access to.
The JSON representations of Focal Point resources can link to other resources by using the JSON element link. The link is similar to the link in the Atom format.