US and Worldwide: +1 (866) 660-7555
Results 1 to 3 of 3

Thread: Trying to build a string fo REST API call, character invalid

  1. #1
    Join Date
    Apr 2017
    Posts
    2

    Default Trying to build a string fo REST API call, character invalid

    Hi mates,

    I'm trying to build a URL source to call a rest api, with this format:

    https://www.something.com/api/2.0/ex...7-04-10&event=["Random+Event"]&where=properties["Random+num"]==31236415

    But when I call from kettle, it throws me the next error:

    2017/04/20 15:22:36 - REST Client - API Call.0 - Caused by: java.lang.IllegalArgumentException: Illegal character in query at index 122: ["Random+Event"]&where=properties["Random+num"]==31666015

    I think that the error is in this part:

    ["Random+Event"]

    But it's the only way to call the rest api, so, how could i do it?


    Thank you in advance.

    Greetings.

  2. #2
    Join Date
    Apr 2017
    Posts
    2

    Default

    Quote Originally Posted by mesturrica View Post
    Hi mates,

    I'm trying to build a URL source to call a rest api, with this format:

    https://www.something.com/api/2.0/ex...7-04-10&event=["Random+Event"]&where=properties["Random+num"]==31236415

    But when I call from kettle, it throws me the next error:

    2017/04/20 15:22:36 - REST Client - API Call.0 - Caused by: java.lang.IllegalArgumentException: Illegal character in query at index 122: ["Random+Event"]&where=properties["Random+num"]==31666015

    I think that the error is in this part:

    ["Random+Event"]

    But it's the only way to call the rest api, so, how could i do it?


    Thank you in advance.

    Greetings.
    Anyone has any idea of how to do it?

  3. #3
    Join Date
    May 2017
    Posts
    8

    Default

    if you're actually using quotes in the URL, you need to encode them

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •