API Ticket Creation

josh's Avatar


18 Mar, 2009 05:18 PM

I can't find anything about what to post to the API if I'm not using Ruby/Rails for a project.... I keep getting "title can't be blank". I've built the XML to send but what POST field do I sent it as?

  1. 1 Posted by Rick on 18 Mar, 2009 09:29 PM

    Rick's Avatar

    You have to send the xml as the raw post data. It's not a POST field really. If you're using curl, it'd look something like:

    curl http://foo.lighthouseapp.com/projects/1/tickets.xml -d "<ticket>...</ticket>"

  2. 2 Posted by nghidav on 02 Apr, 2009 10:49 PM

    nghidav's Avatar

    curl will also need to POST the request and mark the POST data as XML. Here are the options I use:

    curl -H "Content-Type: text/xml" -X POST -d "..."

    Run curl with -v to see what it is doing -- that's how I found curl was sending a "Content-Type: application/x-www-form-urlencoded" header.

    The "title can't be blank" message is lighthouse's way of saying "I don't understand your request", it sends that all sorts of malformed requests.

Discussions are closed to public comments.
If you need help with Lighthouse please start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac