Integrating : Integrating with applications that support REST XML APIs : Updating artifacts in the application by using Focal Point®
  
Updating artifacts in the application by using Focal Point®
After posting the artifacts to the application, if some of the artifacts are modified in Focal Point®, you can update the artifacts back to the application.
Procedure
1 In Focal Point®, open the workspace.
2 Click the Settings icon 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 Command Configuration section, complete these steps:
In REST Client Connector Name, type a name to identify the connection.
In Alias, type an alias name for the connection. The Alias field is available only in Focal Point®, version 6.6.1 and later. A default alias is added to the REST Client View commands created in earlier releases.
In REST Request Method, select the PUT method. For information about each method, see Supported methods to manage resources.
In Friends List, select the application that you added as a friend to Focal Point®.
In Choose URL Attribute to REST Artifact, click Select, and select an attribute. This attribute stores the response URL from the application.
5 In the REST Client Template XML Configuration section, complete these steps:
Select the Use Template XML for REST PUT call checkbox, if the XML of the application where you are creating artifacts is not structured in a manner that Focal Point® expects, you must manually edit the XML.
In REST Application URL to Template XML, type the URL that points to an artifact in the application, and click Get Template XML. The XML loads in the REST Application Template XML text box. If you do not want XML to load dynamically, you can copy the XML in the REST Application Template XML text box.
For the POST operation, you must know the XML of the application where you are posting artifacts. So you get the XML either dynamically or manually. After getting it, that XML must support posting of new data to the application. In some applications, if XML does not support that, you must manually create or edit the XML.
In Root XPath to REST Application Artifact, click Select, and select the root XPath for attributes. The Select button is enabled only if the XML in REST Application Template XML is correct.
6 In the Attribute Mapping section, click Add and map the Focal Point® attributes with the attributes of the application. For example, if the value of the Severity attribute is modified in Focal Point®, map the Severity attribute of Focal Point® with the dc:severity attribute of the application. After the PUT operation, the Severity attribute in the application is modified with the new value.
7 In the Configuration section, complete these steps:
In REST Application supported Date Format, type the date format that the external application uses. Example: yyyy-MM-dd'T'HH:mm:ss.SSS'Z' for IBM Rational Team Concert and yyyy-MM-dd for the Requirements Management application.
In Focal Point® Separator, type a separator value such as a comma (,) or a semicolon (;). The MultiChoice and the LinkedList items will be separated by the specified separator.
Validate a command configuration by executing the command in the Debug mode. To execute the command in the Debug mode, select the Run in Debug Mode check box. After the command is executed, the resulting page displays the following information: the REST Client view command name, the User Authentication Info, the REST Request Method, the Request URL, the Request Header, the Request XML, the Response Code, the Response Header, and the Response field with a link to download the debugging information.
To hide the command from the Select Batch Command to execute list displayed in the Display View Commands window, select the Hide Command in execute window check box.
8 To map the IDs of the attributes between Focal Point® and the application, in Request Parameter Table section, click Add, and select a Focal Point® attribute. Type the ID of the application in the Key column. For example, if you select Project ID for Focal Point®, in the Key column, type the ID that is used for the project ID in the application.
9 Click Save.
10 In the Display menu, click the view the elements of which you want to update in the other application.
11 To update all the artifacts available in the view, from the view toolbar click the dropdown list and select the PUT view command and then click the Go icon Go.
12 To update one artifact, from the artifact toolbar select the PUT view command and then click the Go icon Go.
See also
Integrating with applications that support REST XML APIs