▪ Make sure that the content of the application that supports REST APIs is in the XML format.
▪ Be aware of the XML structure of the application artifacts and have the rights to access them.
About this task
If any of the application attribute IDs exist in Focal Point®, the GET method updates the artifacts associated with that attribute IDs. For example, if, for the first time, you map the IDs and use the GET method, the method retrieves the artifacts from the application. If the artifacts are updated in that application and the next time you map the same IDs and use the GET method, the method updates your existing artifacts in Focal Point®.
Procedure
1 In Focal Point®, open the workspace where you want to retrieve the artifacts.
2 Click the Settings icon and then, from the Configure group, click REST client view command. Click Add view command.
3 Select a view where you want to add the view command.
4 In REST Client Connector Name, type a name for identifying the connection.
6 In Friends List, select the application that you added as a friend to Focal Point®.
7 In REST Application Request URL, type the URL that has artifacts of the application.
Tip Open a web browser and type the URL that you used when adding the REST application as a friend. A list of high-level artifacts is displayed. Find the artifact that you want to retrieve and copy its URL in REST Application Request URL.
8 Click Connect.
9 If the connection is successful, click Select to select the root XPath of the artifact. You can restrict your search to an artifact by selecting an appropriate XPath. If the connection was not successful, you will not be able to select the root XPath.
10 To ensure that the artifacts are not duplicated, in the Identification Mapping section, click Add and map the attribute ID of Focal Point® and another application. You can map only one attribute.
11 In the Attributes Mapping section, click Add to map the application attributes with the attributes of Focal Point®. The mapped attributes are displayed against the element fetched from the application. Ensure that the attributes are editable.
The attribute that you selected in the Identification Mapping section is not displayed in the Attributes Mapping section because that attribute is internally mapped and is available for the fetched elements.
If there are custom attributes in the application from where you are retrieving artifacts and you require a specific item, you can edit the XPath to include that item. For example, if there are multiple custom attributes such as Status, Priority, and Cost, you can add [@attribute:name='Status'] after the customer attribute entry to retrieve the Status attribute.
12 In REST Application supported Date Format, type the date format that the external application uses.
13 In Focal Point® Separator, type a separator value such as , (comma) or ; (semi‑colon); this will be used to separate the MultiChoice and the LinkedList items.
14 In the Request Header Mapping section, click Add, and then type the name and value of the header.
For the Rational solution for CLM applications the headers are:
Header name
Header value
Accept
application/rdf+xml
Content-Type
application/rdf+xml
OSLC-Core-Version
2.0
15 Click Save.
Results
To check whether the artifacts are fetched from the application, navigate to the Display menu and click the view. Select the connector name from the dropdown list. The elements are fetched and loaded in the view.