JSON input on "tasks" API request is always invalid unless using CURL

We are writing a process in GO to call out to Wrike API for all tasks within a date range on the field "dueDate" (example below). All the curl examples work from the documentation using our example but why is curl the only means for a tool to make these API calls work? Should not any framework capable of making HTTPS requests be able to call to Wrike API?

We are using a standard HTTP client in GO and have also tried this API call in Python and NodeJS. All response's were returned as a 400 error with a response body of " {"errorDescription":"Parameter 'dueDate' value is invalid","error":"invalid_parameter"}"

Example - https://www.wrike.com/api/v4/tasks?sortOrder=Desc&sortField=CreatedDate&status=Active&descendants=true&dueDate={"start":"2022-07-07","end":"2022-22-07"}

I have tried all manors of encoding the JSON on the query string with no success in being accepted for each test performed with the various languages. Any suggestions as to what is the problem to help my requests work?

Side thought. It seems very out of place also to use JSON on the query string as the best practice is to always provide JSON on a POST and not a GET.

Any help is appreciated.

0
2 commentaires
Spot On Innovative Approach Stellar Advice

Hi Meetings CTI IT, thank you for posting. I see that my colleagues from the support team are in touch with you via email. Please let me know if I can help with anything else🙋🏻‍♀️

Cansu Community Team at Wrike Wrike Product Manager En savoir plus sur les fonctionalités et les meilleures pratiques grace à nos Webinaires online

Cansu Wrike Team member En savoir plus sur les fonctionalités et les meilleures pratiques grace à nos Webinaires online

0
Spot On Innovative Approach Stellar Advice

We're using python requests module and a request send with data provided in params= argument is working.

0

Folllowing List for Post: JSON input on "tasks" API request is always invalid unless using CURL
[this list is visible for admins and agents only]

Haut de la page
Didn’t find what you were looking for? Write new post