<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Believe it or not, RailsCollab has a RESTful &lt;span class=&quot;caps&quot;&gt;XML&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; (not to be confused with the Basecamp &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; implementation).&lt;/p&gt;
&lt;p&gt;Currently RailsCollab implements resources for the following objects:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Task lists (/project/:project_id/task_lists)&lt;/li&gt;
	&lt;li&gt;Tasks (/project/:project_id/task_lists/:task_list_id/tasks)&lt;/li&gt;
	&lt;li&gt;Messages (/project/:project_id/messages)&lt;/li&gt;
	&lt;li&gt;Message Categories (/project/:project_id/categories)&lt;/li&gt;
	&lt;li&gt;Files (/project/:project_id/files)&lt;/li&gt;
	&lt;li&gt;File Folders (/project/:project_id/folders)&lt;/li&gt;
	&lt;li&gt;Milestones (/project/:project_id/milestones)&lt;/li&gt;
	&lt;li&gt;Times (/project/:project_id/times)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following have yet to be implemented:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Projects (/project)&lt;/li&gt;
	&lt;li&gt;Users (/users)&lt;/li&gt;
	&lt;li&gt;Companies (/companies)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since token logins are not yet implemented for these RESTful API&amp;#8217;s, you will need to snatch a session id from a current session.&lt;/p&gt;
&lt;h2&gt;Task Lists&lt;/h2&gt;
&lt;p&gt;Task Lists are located at &amp;#8220;/project/:project_id/task_lists.xml&amp;#8221;, and are represented as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;task-list&amp;gt;
&amp;lt;description&amp;gt;Task List Description&amp;lt;/description&amp;gt;
&amp;lt;id type=&quot;integer&quot;&amp;gt;1&amp;lt;/id&amp;gt;
&amp;lt;is-private type=&quot;boolean&quot;&amp;gt;false&amp;lt;/is-private&amp;gt;
&amp;lt;milestone-id type=&quot;integer&quot;&amp;gt;2&amp;lt;/milestone-id&amp;gt;
&amp;lt;name&amp;gt;The first TODO LIST!&amp;lt;/name&amp;gt;
&amp;lt;priority type=&quot;integer&quot;&amp;gt;1&amp;lt;/priority&amp;gt;
&amp;lt;tags/&amp;gt;
&amp;lt;/task-list&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you have probably figured out, task items are not represented in the &lt;span class=&quot;caps&quot;&gt;XML&lt;/span&gt; response.&lt;/p&gt;
&lt;p&gt;The properties you can assign are as follows:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;name (string)&lt;/li&gt;
	&lt;li&gt;priority (integer)&lt;/li&gt;
	&lt;li&gt;description (text)&lt;/li&gt;
	&lt;li&gt;milestone-id (integer)&lt;/li&gt;
	&lt;li&gt;is-private (boolean)&lt;/li&gt;
	&lt;li&gt;tags (string, comma separated)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Normal rails resource routing applies, i.e.:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; &amp;#8220;/project/:project_id/task_lists.xml&amp;#8221; to create task lists&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt; &amp;#8220;/project/:project_id/task_lists/:task_list_id.xml&amp;#8221; to update a task list&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;DELETE&lt;/span&gt; &amp;#8220;/project/:project_id/task_lists/:task_list_id.xml&amp;#8221; to delete a task list&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Task List Items&lt;/h2&gt;
&lt;p&gt;Task Lists Items are located at &amp;#8220;/project/:project_id/task_lists/:task_list_id/tasks.xml&amp;#8221;, and are represented as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;task&amp;gt;
&amp;lt;completed-by-id type=&quot;integer&quot;&amp;gt;1&amp;lt;/completed-by-id&amp;gt;
&amp;lt;completed-on type=&quot;datetime&quot;&amp;gt;2008-10-16T00:01:25+01:00&amp;lt;/completed-on&amp;gt;
&amp;lt;created-by-id type=&quot;integer&quot;&amp;gt;1&amp;lt;/created-by-id&amp;gt;
&amp;lt;created-on type=&quot;datetime&quot;&amp;gt;2008-10-16T00:01:23+01:00&amp;lt;/created-on&amp;gt;
&amp;lt;id type=&quot;integer&quot;&amp;gt;4&amp;lt;/id&amp;gt;
&amp;lt;order type=&quot;integer&quot;&amp;gt;2&amp;lt;/order&amp;gt;
&amp;lt;text&amp;gt;Fudge&amp;lt;/text&amp;gt;
&amp;lt;updated-on type=&quot;datetime&quot;&amp;gt;2008-10-16T00:01:25+01:00&amp;lt;/updated-on&amp;gt;
&amp;lt;assigned-to-id&amp;gt;0&amp;lt;/assigned-to-id&amp;gt;
&amp;lt;/task&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The properties you can assign are as follows:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;text (text)&lt;/li&gt;
	&lt;li&gt;assigned-to-id (integer, prefixed with c for company then company-id, otherwise user-id)&lt;/li&gt;
	&lt;li&gt;task-list-id (integer)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Normal rails resource routing applies, i.e.:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; &amp;#8220;/project/:project_id/task_lists/:task_list_id/tasks.xml&amp;#8221; to create tasks&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt; &amp;#8220;/project/:project_id/task_lists/:task_list_id/tasks/:task_id.xml&amp;#8221; to update a task&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;DELETE&lt;/span&gt; &amp;#8220;/project/:project_id/task_lists/:task_list_id/tasks/:task_id.xml&amp;#8221; to delete a task&lt;/li&gt;
&lt;/ul&gt;</body>
  <created-at type="datetime">2008-10-16T01:24:23-07:00</created-at>
  <id type="integer">67878</id>
  <permalink>rest-api</permalink>
  <repository-id type="integer">18257</repository-id>
  <title>REST API</title>
  <updated-at type="datetime">2009-07-23T06:08:08-07:00</updated-at>
  <user-id type="integer">10850</user-id>
</wiki>
