tag:help.lighthouseapp.com,2008-09-20:/discussions/questions/252-email-notifications-upon-ticket-creation-from-apiLighthouse: Discussion 2011-04-07T05:35:23Ztag:help.lighthouseapp.com,2008-09-20:Comment/1415112009-04-24T04:49:34Z2009-04-24T04:49:34ZEmail Notifications upon ticket creation from api?<div><p>Hey Brian, it's possible but not documented yet. Let us run some
tests and get back to you.</p>
<p>Matt</p></div>towskitag:help.lighthouseapp.com,2008-09-20:Comment/1415112009-04-24T05:36:52Z2009-04-24T05:36:52ZEmail Notifications upon ticket creation from api?<div><p>I did a little testing, and yes it is possible -- completely by
accident. I've <a href=
"http://lighthouseapp.com/api/tickets">documented the api
calls</a>. However, the ActiveResource library that our ruby API
uses is a little inflexible, so setting multiple watchers is a
little more more difficult than it should be. The following is what
the API <em>will</em> be once I deploy a minor tweak to make things
easier. The <code>notify-all</code> attribute below will work fine,
but <code>multiple-watchers</code> will be different. The
deployment should happen either tomorrow or over the weekend.</p>
<p>If you're using the <a href=
"http://github.com/Caged/lighthouse-api/tree/master">ruby
lighthouse api</a>:</p>
<pre>
<code class="ruby"># find or create ticket as you would normally
...
# notify all eligible users
ticket.notify_all = 1
# notify only these specific users
ticket.multiple_watchers = "1,2,3"
ticket.save</code>
</pre>
<p>If you're using xml, here's what your ticket request would look
like:</p>
<pre>
<code><ticket>
...
<!-- notify all eligible users -->
<notify-all>1</notify-all>
<!-- notify only these specific users -->
<multiple-watchers>1, 2, 3</multiple-watchers>
</ticket></code>
</pre>
<p>In JSON:</p>
<pre>
<code>{"ticket": {
# notify all eligible users
"notify_all": 1,
# notify only these specific users
"multiple_watchers": [1, 2]
}}</code>
</pre>
<p>Eligible watchers include all project members except for the
people already watching the ticket. If you try to add a user id
from someone that's not part of the current project, the user_id
will be silently ignored.</p></div>Ricktag:help.lighthouseapp.com,2008-09-20:Comment/1415112009-04-24T13:29:59Z2009-04-24T13:29:59ZEmail Notifications upon ticket creation from api?<div><p>That looks great and easy to use. Could you notify me when you
do the deploy?</p>
<p>Thanks, Brian</p>
<p>On Fri, Apr 24, 2009 at 1:36 AM, Lighthouse Support <
support@lighthouseapp.com> wrote:</p></div>bburridg