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

ETM Rest API: how to get property equal to title with special character "#"

 I want to get the properties which are equal to a title name. For example like this:


Unfortunately this does not work. I think the special characters like "_" and "#" are preventing to make this work.
The query does only work if the titlenames doesn't have special characters.

Can someone help me with this issue?

Thanks! 

0 votes

Comments

Did you try url encoding the whole query parameter value, i.e.  ?fields=feed%2Fentry%2Fcontent%2Fproperty%5Btitle%3D%22test123_tt%23433%22%5D

Hi, thanks for the reply. I've tried it with your suggested url encoding, but then i got an 400 Error. Instead of [title="test123_tt#433"] ive tried it with [title="test123_tt##433"] and encoded the whole fields query again.This worked for me. This means double hashes(##) should be used, if we look for values, which contain only one "#".  Is this assumption correct? Couldn't find this information anywhere. 

How does your example conform to the URL encoding standards? According to https://de.wikipedia.org/wiki/URL-Encoding  # would be encoded using %23. Seeing any # in your answer above tells us that you did not encode it. The encoding would also potentially needed for other characters such as " etc. Carefully read the answer from Ian.

I didn't send the query directly with [title="test123_tt#433"]. Of course i have encoded it.The encoded fields part looks like this:  fields=feed%2Fentry%2Fcontent%2Fproperty%5Btitle%3D%22ABC40_TT%23433%22%5D. (As Ian described it).

Somehow it works only, If i use for the title double hashes like this: [title="test123_tt##433"]. The encoded part looks like this: fields=feed%2Fentry%2Fcontent%2Fproperty%5Btitle%3D%22ABC40_TT%23%23433%22%5D. This one is getting me properties with the title "test123_tt#433". Why should we filter for double hash "##", if we are looking for a titlename with single hash "#"? I was expecting to filter for the exact titlename. But seems like the titlename should be adapted, if it has a special character?

Maybe the double hash is because the documented:  https://jazz.net/wiki/bin/view/Main/RqmApi . I am not sure, I have not done a lot with this API.


Comparison operand. When comparing xs:string properties, case insensitive. When comparing xs:string properties, may contain one or more wildcard characters1, including % (matches zero or many characters)1, _ (matches exactly one character)1, or a user-defined wildcard character1. Note, wildcard characters may be escaped by a proceeding # character and non-escape # characters must be escaped by a proceeding # character. URLs MUST be URL encoded (separate from the fields parameter) since they contain URI-reserved characters (see RFC 2396).


Be the first one to answer this question!

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
× 479
× 34

Question asked: Aug 11 '22, 3:57 p.m.

Question was seen: 955 times

Last updated: Aug 16 '22, 4:42 a.m.

Related questions
Confirmation Cancel Confirm