Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How Do I Escape an Apostrophe in a REST API Query?

I am trying to write a REST API query that looks like this:

https://<server>:<port>/ccm/rpt/workitem?fields=workitem[projectArea/name="Nate's Sandbox Area"]/*

If the project area name does not have an apostrophe in it, this works fine. As soon as I put the apostrophe in there, I get zero results. The page doesn't display an error or complain about a badly formatted request, I just get a page with zero results.

How do I correctly escape an apostrophe in this scenario?

0 votes

Comments

I have done some debugging and it appears that the application cannot handle the apostrophe sign in a query correctly - the term becomes an empty string when it is passed to the server. I suggest you open a support ticket to get it investigated further.



One answer

Permanent link
Well, as you don't mention what you have tried, I don't think encoding will help.   You might try doubling the single quote:

[projectArea/name="Nate''s Sandbox Area"]


0 votes

Comments

Unfortunately I tried that as well. I could list all the things that I tried for what it's worth:

"Nate's Sandbox Area"
(Nate's Sandbox Area)
<Nate's Sandbox Area>
<"Nate's Sandbox Area">
"Nate''s Sandbox Area"
"Nate\'s Sandbox Area"
"Nate%'%s Sandbox Area"
"Nate%27s Sandbox Area"

A few other permutations as well... I've decided the guess-and-check approach will be fruitless here.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 479

Question asked: Sep 04 '14, 10:46 a.m.

Question was seen: 10,067 times

Last updated: Sep 04 '14, 9:48 p.m.

Confirmation Cancel Confirm