Menu

Percent invalid in query Key on Rest/JSON iTop

Firhansyah
2021-02-04
2021-02-04
  • Firhansyah

    Firhansyah - 2021-02-04

    I have a need to search for tickets based on ref-no with "LIKE" conditions.

    If the query is executed in Run Queries on iTop, then the query is executed successfully. But if the query is executed in Rest / JSON, it will get an error with the message "Error: Parameter json_data is not a valid JSON structure".

    After I searched, it turned out that there was a problem with the percent of characters in the like condition. Because if I remove the like condition part, the query can be run in Rest / JSON. But if I try to use JSON Formatter like "Json Formatter", my json is valid.

    How to fix this problem?

    Thanks before.

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-02-04

    I'm assuming the problem lies in the HTTP request; where % is sometimes used for hex encoding. For instance, %20 is a space.

    So before sending the request, I think you'll need to do proper encoding for the % character.

    Just a guess :)

     
    👍
    1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.