This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

REST query on text property value with percent character results in web service internal server error

Hi all,

I am using a REST API call to find an (external) object with a specific value on a text property on that object. If the text search value contains a percent character, the web service returns error 500 internal server error:

{"Status":500,"URL":"/Objects","Method":"GET","Exception":{"Name":"JScriptException","Message":"The URI to be decoded is not a valid encoding"},"Stack":"Error reference ID:
d897c3d8-c8f4-4d89-b354-c16399068022","Message":"The URI to be decoded is not a valid encoding","IsLoggedToVault":true,"IsLoggedToApplication":true,"ExceptionName":"JScriptException"}

This is the original query
        /REST/Objects.aspx?o=101&p1240=WIA AANVULLING 20%

Variant: - url encoded argument

        /REST/Objects.aspx?o=101&p1240=WIA+AANVULLING+20%25

Same result: internal server error, while properly encoded.

How to search on a text property value that contains percent character or any other forbidden character on the querystring?

Parents
  • I have found a tracker item about this (133664).  It appears that there is some "special" encoding needed for some characters:

    "_":        = "_u"
    "%":      = "_p"
    "*":       = "_a"
    ".":        = "_s"
    "\'":       = "_q"

    This has never made it to the documentation so I will look to sort that ASAP.

    So it looks like your query should be "/REST/Objects.aspx?o=101&p1240=WIA+AANVULLING+20_p25".  Are you able to try that and let me know how it goes?

    Regards,

    Craig.

  • I just wanted to clarify: the logic is actually to URI-encode first, and then convert the characters above (hence "%" becomes "%25" first, then "_p25").

Reply Children