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!
|
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.