tag:help.lighthouseapp.com,2008-09-20:/discussions/api-developers/171-json-api-doesnt-seem-to-like-submitting-dataLighthouse: Discussion 2011-11-07T22:22:57Ztag:help.lighthouseapp.com,2008-09-20:Comment/42931672010-12-16T10:34:56Z2010-12-16T10:34:56ZJSON API doesn't seem to like submitting data<div><p>OK, some more information. Milestones works fine. It's just
ticket bins that has a 500 on creation. It also gives a 200 back on
update (PUT) but it doesn't actually update it on the site.</p></div>Martin Pilkingtontag:help.lighthouseapp.com,2008-09-20:Comment/42931672010-12-16T20:22:39Z2010-12-16T20:22:39ZJSON API doesn't seem to like submitting data<div><p>I had a look at this yesterday, but I didn't test ticket bins.
I'm investigating and I'll let you know something.</p></div>Justin Palmertag:help.lighthouseapp.com,2008-09-20:Comment/42931672010-12-16T21:54:30Z2010-12-16T21:54:30ZJSON API doesn't seem to like submitting data<div><p>Got a little further with this. I was able to create a ticket
bin, but had to make a small change. The namespace will be "bin" vs
"ticket-bin" in your JSON.</p>
<p>Here is what's working for me using curl.</p>
<pre>
<code>justin@justin ~% curl -H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"bin":{"name":"My TITLE","query": "state:open"}}' \
"http://activereload.local.i:3000/projects/2/bins.json?_token=c7fe4e1d9f492321885b042819f3f6225133fc0a"</code>
</pre>
<p>This doesn't explain the 200 you're seeing on a PUT, but that
might be some side effect (albeit, the wrong one) of not using
'bin'.</p></div>Justin Palmer