Creating REST URIs to modify records
You can create REST URIs to modify records in your user database by linking directly to the records.
About this task
Procedure
Example
Examples
The following REST URI template
to modify a record was created by using the New REST URI wizard. In
this example, ALMActivity
was selected from the Record
Type list, Activate
was selected from
the Action Type list, and the check boxes Automatically
save changes, Automatically log in,
and Include the banner, workspace tree, and main toolbar were
selected to create the REST URI.
http://CQWebServerHost/cqweb/restapi/YourConnection/YourUserDB/RECORD?format=HTML&recordType=ALMActivity&action=Activate&fieldsXml=&autoSave=true&loginId={{loginid}}&password={{password}}
- CQWebServerHost
- Web address of your HCL Compass Web server host system. This value is defined when the REST URI template is created.
- YourConnection
- Your HCL Compass connection. This value is defined when the REST URI template is created.
- YourUserDB
- Your HCL Compass user database. This value is defined when the REST URI template is created.
- format
- The default format for the resource request is
HTML
. You can change the format toXML
orATOM
, if desired. - {{loginid}}
- Placeholder for your logon ID.
- {{password}}
- Placeholder for your password.
The following examples show how to enter date field, reference field, reference list, and multiple-line field values as parameters in a REST URI.
- This example shows how to supply a date field value as a parameter
in a REST URI to submit or modify a record:
fieldsXML=<Field><Name>f_datetime</Name><Value><![CDATA[2008-09-08%2009%3A44%3A34]]></Value></Field>
Result: The record field f_datetime is set to
08/09/08 09:44:34
. - The next example shows how to supply a reference field or reference
list values as parameters in a REST URI to submit or modify a record:
fieldsXML=<Field><Name>customer</Name><Value><!CDATA[Joe%20Lee]]></Value><Value><!CDATA[Jane%20Smith]]></Value></Field><Field><Name>Project</Name><Value><!CDATA[Classics]]></Value></Field>
Result: In the reference list customer in the record,
Joe Lee
andJane Smith
are added, and in the reference field Project,Classics
is added. - This example shows how to supply a multiple-line field value as
a parameter in a REST URI to submit or modify a record:
fieldsXML=<Field><Name>Description</Name><Value><![CDATA[firstline%0Asecondline]]></Value></Field>
Result: In the record field Description, the text
firstline
andsecondline
are formatted to appear on separate lines.