Bad JSON input when using ticket update

14 views
Skip to first unread message

yis...@builderedge.com

unread,
Feb 15, 2017, 1:20:39 AM2/15/17
to Assembla API Development
Hi,

Cab anyone help me figure out what I'm doing wrong?
I'm trying to update a ticket's tags:
curl -i -X PUT -H "X-Api-Key: AAA" -H "X-Api-Secret: SSS" -H "Content-type: application/json" -d '{"ticket":{"tags":["test"]}}' https://api.assembla.com/v1/spaces/MY_SPACE_ID/tickets/TICKET_NUMBER.xml
I also tried
curl -i -X PUT -H "X-Api-Key: AAA" -H "X-Api-Secret: SSS" -H "Content-type: application/json" -d '{"ticket":{"priority":1}}' https://api.assembla.com/v1/spaces/MY_SPACE_ID/tickets/TICKET_NUMBER.xml

I get a response with Status: 400 Bad Request, and a description "Bad JSON input".

Thanks,
Yishay

Stanislav Kolotinskiy

unread,
Feb 16, 2017, 2:28:17 AM2/16/17
to yis...@builderedge.com, Assembla API Development
Hi Yishay,

I just tried your command and it worked just fine for me - I got a 204 response. Can you please try again?

Regards,
Stanislav

--
You received this message because you are subscribed to the Google Groups "Assembla API Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to assembla-api-d...@googlegroups.com.
To post to this group, send email to assembla...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yis...@builderedge.com

unread,
Feb 16, 2017, 2:37:05 AM2/16/17
to Assembla API Development, yis...@builderedge.com
Hi Stanislav,

I appreciate your help.

Just tried it again, same result:
HTTP/1.1 400 Bad Request
Date: Thu, 16 Feb 2017 07:34:57 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=XXX; expires=Fri, 16-Feb-18 07:34:57 GMT; path=/; domain=.assembla.com; HttpOnly
X-Request-Id: XXX
X-Runtime: 0.001801
X-Powered-By: Phusion Passenger 5.0.28
Status: 400 Bad Request
Server: cloudflare-nginx
CF-RAY: 331f51ef0d46345e-LHR

Bad JSON input

Thanks,
Yishay

Stanislav Kolotinskiy

unread,
Feb 24, 2017, 1:21:26 AM2/24/17
to yis...@builderedge.com, Assembla API Development
Hi Yishay,

sorry for the delay - well, I tried again your first command and it worked perfectly fine for me. Did you try to update any other ticket besides the one that actually fails?

Regards,
Stanislav

On Feb 15, 2017, at 08:20, yis...@builderedge.com wrote:

Reply all
Reply to author
Forward
0 new messages