Problems updating from v3 to v4, Receiving Bad Request

My team is encountering an error when trying to hit the Wrike API endpoint. We are using an Elixir App using HTTPoison that hits a Wrike endpoint. Here are some logs from google cloud. Any assistance anyone might be able to provide would be greatly appreciated!

Logs:

Example Log 1

20:32:53.489 handler=Tasks [error] Failed to fetch tasks: ["IEABQWIVI4GZITLH", "Completed"] because {:ok, %HTTPoison.Response{body: "<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>400 Bad Request</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n", headers: [{"Server", "nginx"}, {"Date", "Fri, 07 Jun 2019 20:32:53 GMT"}, {"Content-Type", "text/html"}, {"Content-Length", "166"}, {"Connection", "close"}], request_url: "https://www.wrike.com/api/v4/folders/IEABQWIVI4GZITLH/tasks?completedDate={\"start\":\"2019-06-07T19:32:52Z\"}&fields=[\"metadata\"]&status=Completed", status_code: 400}}

We have also tried the following request_urls:
"https://www.wrike.com/api/v4/folders/IEABQWIVI4GZITLH/tasks?completedDate={'start':'2019-06-07T19:32:52Z'}&fields=['metadata']&status=Completed"

"https://www.wrike.com/api/v4/folders/IEABQWIVI4GZITLH/tasks?completedDate={%22start%22:%222019-06-07T19:32:52Z%22}&fields=[%22metadata%22]&status=Completed"

We have also tried using the v3 version of the request_url:

Example Log 2

EDT 20:33:03.495 handler=Tasks [error] Failed to decode:

"<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>400 Bad Request</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n"

{
insertId: "18eh7esfdppbjx"

labels: {…}
logName: "projects/bdt-eng-prod/logs/document-submissions"
receiveTimestamp: "2019-06-07T20:33:06.670237613Z"

resource: {…}
severity: "INFO"
textPayload: "20:33:03.495 handler=Tasks [error] Failed to decode: "<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>400 Bad Request</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n" "
timestamp: "2019-06-07T20:33:03.496537668Z"
}

 

Interestingly, this curl request goes through successfully:

curl -g -v -X GET -H 'Authorization: bearer <...>' 'https://www.wrike.com/api/v3/folders/IEABQWIVI4GZITLH/tasks?completedDate={"start":"2019-06-07T14:42:36Z"}&fields=["metadata"]&status=Completed'

0
3 comments
Spot On Innovative Approach Stellar Advice
Avatar

I'd be happy to share any further details I might be able to provide for someone to help me troubleshoot this!

0
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Anthony, thanks for reaching out with this 🙂

I think we'll need help from our amazing Support team here. I'm going to raise a ticket for you now, someone from the team will be in touch soon.

Please don't hesitate to come back to the Community to ask any questions that come up, I (and the wider Community) will be happy to discuss 🙌

Lisa Community Team at Wrike Become a Wrike expert with Wrike Discover

0
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Lisa,

I already reached out to Support about this and they feel that since I am able to successfully use curl to hit the Wrike endpoint, the problem must be somewhere on my end. If you know of anyone with experience using an Elixir App or GCP infrastructure that utilizes the Wrike API, or if some documentation exists for an elixir/GCP setup, that would be greatly appreciated!

Thanks for the follow up!

 

0
Comment actions Permalink

Folllowing List for Post: Problems updating from v3 to v4, Receiving Bad Request
[this list is visible for admins and agents only]

Didn’t find what you were looking for? Write new post