How to preseve markup tags in Description field in the payload when creating artifacts with Web Services API

Document ID : KB000057551
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue

A user tries to include xml tags in the payload but they are ignored.

Resolution

In this example a defect is created when hitting this endpoint:

https://rally1.rallydev.com/slm/webservice/v2.0/defect/create

The user initially tried the following payload:

{"defect":{"name":"text-xml","description":"<outer>text<inner>text</inner></outer>"}}

which created a defect where Description field did not include xml tags:

User-added image

To preserve the markup tags use &lt; and &gt; as shown below:

{"defect":{"name":"text-xml","description":"&lt;outer&gt;text&lt;inner&gt;text&lt;/inner&gt;&lt;/outer&gt;"}}

Here is the outcome:

User-added image

A screenshot from Chrome's Advanced Rest Client shows that API Key in zsessionid header is used for authentication:

User-added image
?