Search

Posting to a nested resource

Subscribe to Posting to a nested resource 3 post(s)

 
PaulO

Am I doing something incorrectly, or is there a glitch in the API?

curl -i -u 'login:password' -X GET 'http://subdomain.unfuddle.com/api/v1/projects/project_id/tickets/ticket_id/comments'
works, but
curl -i -u 'login:password' -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -d 'Test gives me a 500 error.

Does anyone have an example of posting a comment that works?

 
Joshua Frappier

Paul,

There should not be any problem posting to the comments resource of a ticket to create a comment. However, I do notice that you are missing a closing “>” character at the end of the data you are posting. I can confirm from our logs that this is why your request is failing.

I hope that helps!

 
PaulO

Wow. My apologies. Thanks for spotting that.