Unfuddle API: Projects

Introduction top

  • Each Account can have any number of Projects.

Projects top

The collections represents all Projects within the Account to which the requesting person has access. The Project instance contains very basic, high level information about a Project.

URL:
/api/v1/projects
[GET, POST]
/api/v1/projects/{id}
[GET, PUT, DELETE]
/api/v1/projects/by_short_name/{short_name}
[GET]
Response Formats:
XML, JSON
Request/Response Body:
See Project Data Model
Notes:
Please note that the "by_short_name" URL is meant as a convenience only. If you wish to POST or DELETE to a project, or access nested resources such as tickets or messages, you must use the URL based on the project ID.
Example:
curl -i -u username:password -X GET \
  -H 'Accept: application/xml' \
  http://mysubdomain.unfuddle.com/api/v1/projects.xml

Project Activity top

Returns the activity for the given Project. Query parameters can be passed via the query string parameters or in the request body. If no request body is given, activity for the last two weeks is returned.

URL:
/api/v1/projects/#{id}/activity
[GET]
Response Formats:
XML, JSON, RSS
Parameters (via query string or request body):
<request>
  <!-- specifies the inclusive start date of the query -->
  <start-date>2007/1/1</start-date>
  <!-- specifies the inclusive end date of the query -->
  <end-date>2007/12/31</end-date>
  <!-- specifies the maximum number of results to return -->
  <limit>50</limit>
</request>
Response Body:
<events>
  <event>
    <project-id type="integer"> </project-id>
    <created-at type="datetime"> </created-at>
    <record-type> [Message, Milestone, Ticket, TimeEntry, Changeset, Comment] </record-type>
    <record-id type="integer"> </record-id>
    <event> [accept, close, commit, create, delete, reopen, resolve, unaccept, status_update] </event>
    <description> </description>
    <person-id type="integer"> </person-id>
    <summary> </summary>
    
    <!--
      if a record exists, then it will be included here.
      note that only ONE of these will exist, corresponding to record-type
      see data model documentation for format.
    -->
    <record>
      <message> ... </message>
      <milestone> ... </milestone>
      <ticket> ... </ticket>
      <time-entry> ... </time-entry>
      <changeset> ... </changeset>
      <comment> ... </comment>
    </event>
</events>
Example:
curl -i -u username:password -X GET \
  -H 'Accept: application/xml' \
  -H 'Content-Type: application/xml' \
  'http://mysubdomain.unfuddle.com/api/v1/projects/123/activity.xml?start_date=2007/5/25&end_date=2007/6/25'

Project Search top

Searches through the given Project for occurrences of the given query. Query parameters can be passed via the query string parameters or in the request body.

URL:
/api/v1/projects/{id}/search
[GET]
Response Formats:
XML, JSON
Parameters (via query string or request body):
<request>
  <!-- REQUIRED: specifies the text of the query -->
  <query>dashboard widget</query>
  <!-- zero-based index specifies where to start in the results (for pagination) -->
  <start-index>20</start-index>
  <!-- zero-based index specifies where to end in the results (for pagination) -->
  <end-index>39</end-index>
  <!-- comma separated string of object types by which to filter -->
  <filter>changesets,comments,messages,milestones,notebooks,tickets</filter>
</request>
Response Body:
<results>
  <result>
    <type> [Changeset, Comment, Message, Milestone, Ticket]</type>
    <location> </location>
    <title> </title>
    <description> </description>
    <updated-at type="datetime"> </updated-at>

    <!-- does not exist for results of type 'Milestone' or 'Ticket' -->
    <author-id> </author-id>

    <!-- exists only for results of type 'Milestone' -->
    <archived> </archived>
    <completed> </completed>
    <due-on> </due-on>

    <!-- exists only for results of type 'Ticket' -->
    <status> </status>

  </result>
  ...
</results>
Example:
curl -i -u username:password -X GET \
  -H 'Accept: application/xml' \
  'http://mysubdomain.unfuddle.com/api/v1/projects/87534/search.xml?query=john+support+dashboard'

Project Dump top

Returns a dump of all data models in the project in XML format. This is equivalent to the XML file that appears in a comprehensive backup. For a comprehensive backup including media files and subversion repository dumps, see Project Backups.

URL:
/api/v1/projects/{id}/dump
[GET]
Response Formats:
XML
Example:
curl -i -u username:password -X GET \
  -H 'Accept: application/xml' \
  'http://mysubdomain.unfuddle.com/api/v1/projects/455/dump.xml'

Backups top

The collections represents any Backups within the given Project.

A Backup is comprehensive backup including an XML file representing all data models, media files and subversion repository dumps. Creating a Backup will initiate a request to backup your project. This process usually takes less than 30 minutes. Once Unfuddle has created the backup, the "processed" field is set to true. At this point, the backup can now be downloaded. Note that backups are automatically purged 7 days after their creation.

URL:
/api/v1/projects/{id}/backups
[GET, POST]
/api/v1/projects/{id}/backups/{id}
[GET, PUT, DELETE]
/api/v1/projects/{id}/backups/{id}/download
[GET]
Response Formats:
XML, JSON, TGZ
Example:
curl -i -u username:password -X GET \
  -H 'Accept: application/xml' \
  'http://mysubdomain.unfuddle.com/api/v1/projects/455/backups/1771.xml'

Components top

The collections represents any Components within the given Project.

URL:
/api/v1/projects/{id}/components
[GET, POST]
/api/v1/projects/{id}/components/{id}
[GET, PUT, DELETE]
Response Formats:
XML, JSON
Request/Response Body:
See Component Data Model
Example:
curl -i -u username:password -X GET \
  -H 'Accept: application/xml' \
  'http://mysubdomain.unfuddle.com/api/v1/projects/500/components.xml'

Severities top

The collections represents any ticket Severities within the given Project.

URL:
/api/v1/projects/{id}/severities
[GET, POST]
/api/v1/projects/{id}/severities/{id}
[GET, PUT, DELETE]
Response Formats:
XML, JSON
Request/Response Body:
See Severity Data Model
Example:
curl -i -u username:password -X GET \
  -H 'Accept: application/xml' \
  'http://mysubdomain.unfuddle.com/api/v1/projects/500/severities.xml'

Versions top

The collections represents any Versions within the given Project.

URL:
/api/v1/projects/{id}/versions
[GET, POST]
/api/v1/projects/{id}/versions/{id}
[GET, PUT, DELETE]
Response Formats:
XML, JSON
Request/Response Body:
See Version Data Model
Example:
curl -i -u username:password -X GET \
  -H 'Accept: application/xml' \
  'http://mysubdomain.unfuddle.com/api/v1/projects/500/versions.xml'