<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Recent Posts in Update ticket to mark as resolved | Unfuddle Community</title>
    <link>http://unfuddle.com/community</link>
    <description>Unfuddle Community Forums</description>
    <item>
      <guid isPermaLink="false">www.unfuddle.com/community:6:885:2522</guid>
      <title>Update ticket to mark as resolved posted by benAT @ Mon, 29 Mar 2010 05:23:37 UTC</title>
      <link>http://www.unfuddle.com/community/forums/6/topics/885</link>
      <description>Hi, can anybody tell me the URL and request body to send for updating a ticket using the Unfuddle API?  My code below simply creates a new ticket, ignoring the id attribute within the XML.  Thanks.

string fullUrl = BaseUrl + &quot;projects/7/tickets/&quot;;
			HttpWebRequest request = (HttpWebRequest)WebRequest.Create(fullUrl);
			request.KeepAlive = false;
			request.ProtocolVersion = HttpVersion.Version10;
			request.Method = &quot;PUT&quot;;

			// Create the string you want to post to the service
			var str = @&quot;&lt;?xml version=&quot;&quot;1.0&quot;&quot; encoding=&quot;&quot;utf-8&quot;&quot;?&gt;&lt;ticket&gt;&lt;id&gt;58&lt;/id&gt;&lt;priority&gt;1&lt;/priority&gt;&lt;summary&gt;API Test Updated&lt;/summary&gt;&lt;description&gt;Description&lt;/description&gt;&lt;/ticket&gt;&quot;;
			byte[] postBytes = Encoding.ASCII.GetBytes(str);
			request.ContentType = &quot;text/xml; encoding='utf-8'&quot;;
			request.ContentLength = postBytes.Length;
			Stream requestStream = request.GetRequestStream();
			requestStream.Write(postBytes, 0, postBytes.Length);
			requestStream.Close();
var response = (HttpWebResponse)request.GetResponse();</description>
      <pubDate>Mon, 29 Mar 2010 05:23:37 UTC</pubDate>
      <author>benAT</author>
    </item>
    <item>
      <guid isPermaLink="false">www.unfuddle.com/community:6:885:2524</guid>
      <title>Update ticket to mark as resolved replied by David C. @ Tue, 30 Mar 2010 02:19:57 UTC</title>
      <link>http://www.unfuddle.com/community/forums/6/topics/885</link>
      <description>It is not possible to create a ticket with a &quot;PUT&quot; request. If a ticket is indeed being created you are unintentionally doing a &quot;POST&quot; to &quot;&#8230;projects/7/tickets/&quot;. Also, you should be sure that you are using the ticket's ID in the request body as opposed to the ticket's number.

For your reference the URL to update the ticket in project 7 with the ID 58 is as follows:

    http(s)://yoursubdomain.unfuddle.com/api/v1/projects/7/tickets/58

The request body will only need to contain the fields you wish to change. To update a ticket's priority, summary and description the request body would look something like the following:

    &lt;ticket&gt;&lt;priority&gt;1&lt;/priority&gt;&lt;summary&gt;API Test Updated&lt;/summary&gt;&lt;description&gt;Description&lt;/description&gt;&lt;/ticket&gt;</description>
      <pubDate>Tue, 30 Mar 2010 02:19:57 UTC</pubDate>
      <author>David C.</author>
    </item>
  </channel>
</rss>

