It's all about the answers!

Ask a question

RTC rest API / Argument with single quote character in value


Olivier ROSET (50221) | asked Oct 13 '20, 5:59 a.m.
Hi,

I try to do a call to the rtc api in javascript.
The called url look like this : 
 https://<server-address>:9443/ccm/rpt/repository/workitem?fields=workitem/category[projectArea/name='Container témoin (vision cible SAFe 4.0)' and name='Impact Equipe1 l\'erreur 1']/teamAreas/itemId

My problem is when the name argument contains a single quote.
I have tried encodeURI, encodeURIComponent, String.replace(/'/g, "%27"), and others solutions, but no way.
IF the name argument value contains a single quote, I got a error in return.

Error 500: CRRED0133E: Illegal fields argument.  The field &#39;workitem/category&#39; is not valid.  &#39;]&#39; expected.

Any advice about how to pass the single quote character to the name argument ?


Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.