Projects
February 6, 2014 ยท View on GitHub
For the full XML representation of projects, check out the data reference.
Get projects
GET /projects.xmlreturns all accessible projects. This includes active, inactive, and archived projects.
Response:
<projects>
<project>
...
</project>
<project>
...
</project>
...
</projects>
Get project
GET /projects/#{project_id}.xmlreturns a single project identified by its integer ID
Response:
<project>
<name>Design Review</name>
...
<company>
<name>Globex Corporation</name>
...
</company>
</project>
Create project
POST /projects.xmlcreates a new project with the given name.
Request:
<request>
<project>
<name>Shopping Cart Redesign</name>
</project>
</request>
Response:
Returns status code 201 (Created) on success with the Location header set to the URL for the new project. You can extract the ID of the project from the URL. Failed requests will receive a 422 (Unprocessable Entity) or 500 (Server Error) status code in the response.
Update project
PUT /projects/#{project_id}.xmlupdates attributes of the given project.
Only administrative users may update project records. You only need to provide the attributes you wish to update; others ought to be omitted from the request.
Request:
<project>
<name type="string">Shopping Cart Redesign</name>
<start-page type="string">log|all|todos|milestones|files</start-page>
<status>active|on_hold|archived</status>
<company-id>#{client-id}</company-id>
<show-writeboards>true|false</show-writeboards>
<announcement>...</announcement>
<show-announcement>true|false</show-announcement>
</project>
Response:
Returns 200 OK on success. Otherwise, returns an error code (e.g. 422 or 403), possibly including a payload describing the error.
Project counts
GET /projects/count.xmlreturns a count of all projects, by project status.
If there are no projects with a particular status, that status entry will be omitted from the report.
Response:
<count>
<active type="integer">5</active>
<on-hold type="integer">2</active>
<archived type="integer">11</active>
</count>