Parker Software Ltd Homepage
Forum Home Forum Home > ThinkAutomation Business Process Automation > ThinkAutomation Version 4
  New Posts New Posts RSS Feed - [SOLVED] JSON error 400
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] JSON error 400

 Post Reply Post Reply
Author
Message
AlexUhde View Drop Down
New User
New User


Joined: 26 Dec 2017
Location: Brisbane
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexUhde Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] JSON error 400
    Posted: 26 Dec 2017 at 10:24pm
Hello all,

I'm trying to do a "Read JSON Document" Trigger, but I'm receiving a HTTP 400 error.

I tried using the query without parameters and it works fine.
The query with parameters works fine in Postman.

The problem seems to be that the parameters contain spaces:
https://api.randomserver.com/v4_6_release/apis/3.0/service/tickets/?conditions=summary like 'Network Monitoring : VMHOST1 problem' and closedFlag=False

This for the Connectwise Manage API.

Kind regards,
Alex


Edited by AlexUhde - 10 Jan 2018 at 5:22pm
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 28 Dec 2017 at 2:59am
Is it possible for you to post a screenshot of how you have configured your Read JSON document trigger action?
Back to Top
AlexUhde View Drop Down
New User
New User


Joined: 26 Dec 2017
Location: Brisbane
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexUhde Quote  Post ReplyReply Direct Link To This Post Posted: 28 Dec 2017 at 3:14am
Hello Jim,
This is the "Get JSON From URL" window.
The URL is the same as in the first post.
I think that ThinkAutomate can't handle the spaces.


Kind regards,
Alex
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 28 Dec 2017 at 4:18am
I don't think you are allowed spaces in URL's.

Where you have spaces in your 'JSON Document URL', could you replace them with this;

%20

For example, change this...

bob.com/directory/resource goes here

...to...this...

bob.com/directory/resource%20goes%20here

That's the W3 method of putting spaces in a URL from what I recall.

https://www.w3schools.com/tags/ref_urlencode.asp


Edited by parkersoft-jim - 28 Dec 2017 at 5:30am
Back to Top
AlexUhde View Drop Down
New User
New User


Joined: 26 Dec 2017
Location: Brisbane
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexUhde Quote  Post ReplyReply Direct Link To This Post Posted: 28 Dec 2017 at 11:17pm
Hello Jim,

Thank you very much, that fixed my issue.
It's strange that it worked in postman.

Thank you,
Alex
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 30 Dec 2017 at 10:45am
I'm not famliiar with Postman, but perhaps Postman simply auto corrects spaces with %20.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.05
Copyright ©2001-2016 Web Wiz Ltd.

This page was generated in 0.030 seconds.