Unfuddle API: Repositories
Introduction 
Each Unfuddle Account can have any number of Repositories associated with it. These Repositories can then be associated with any number of Unfuddle Projects.
Each Repository has many Changesets associated with it. By default, Unfuddle will create a Changeset object whenever a commit happens on a repository. These Changesets are essentially a mirror of commit related information stored in the Unfuddle databases to speed up web-based reporting and email notification as introspecting the repository itself can often be a very expensive operation.
This opens up some interesting opportunities, especially to those customers wishing to host an external repository for their Project. If you are hosting an external repository for your Project, but still wish to receive notification of updates to the repository via Unfuddle dashboards and emails, you may choose to manually create Changesets for the Repository (i.e. via Subversion "post-commit" or Git "post-receive" hook scripts).
If you wish to assume the responsibility of managing Changesets for your Repository, because your repository is hosted elsewhere or for any other reason, please note that you must first indicate to Unfuddle that it is no longer responsible for automatically managing Changesets. To do this, please be sure to check "Changesets Managed Manually" from the Repository edit screen.
Repositories 
The collection represents all Repositories within an Account.
- URL:
- /api/v1/repositories[GET, POST]
- /api/v1/repositories/{id}[GET, PUT, DELETE]
- Response Formats:
- XML, JSON, RSS
- Request/Response Body:
- See Repository Data Model
- Example:
-
curl -i -u username:password -X POST \ -H 'Accept: application/xml' \ -H 'Content-Type: application/xml' \ -d "<repository><abbreviation>mynewrepo</abbreviation><title>My New Repo</title><system>svn</system><projects><project id='30226'></projects></repository>" \ 'http://mysubdomain.unfuddle.com/api/v1/repositories'
Changesets 
The collection represents all Changesets within a Repository.
- URL:
- /api/v1/repositories/{id}/changesets[GET, POST]
- /api/v1/repositories/{id}/changesets/{id}[GET, PUT, DELETE]
- /api/v1/projects/{id}/changesets [DEPRECATED][GET, POST]
- /api/v1/projects/{id}/changesets/{id} [DEPRECATED][GET, PUT, DELETE]
- Response Formats:
- XML, JSON, RSS
- Parameters (via query string or request body):
-
<request> <!-- specifies whether or not to process message actions on (POST only) --> <process-message-actions> [true, false] </process-message-actions> </request> - Request/Response Body:
- See Changeset Data Model
- Example:
-
curl -i -u username:password -X POST \ -H 'Accept: application/xml' \ -H 'Content-Type: application/xml' \ -d '<changeset><revision>512</revision><message>Unfuddled the Widgetizer</message></changeset>' \ 'http://mysubdomain.unfuddle.com/api/v1/projects/3455/changesets?process_message_actions=true'
Latest Changeset 
Returns the most recently committed Changeset within a Repository.
- URL:
- /api/v1/repositories/{id}/changesets/latest[GET, POST]
- /api/v1/projects/{id}/changesets/latest [DEPRECATED][GET, POST]
- Response Formats:
- XML, JSON
- Response Body:
- See Changeset Data Model
- Example:
-
curl -i -u username:password -X GET \ -H 'Accept: application/xml' \ http://mysubdomain.unfuddle.com/api/v1/projects/3455/changesets/latest.xml
Process Message Actions 
Unfuddle is capable of processing the commit message for any Changeset and using it to modify the status of tickets (i.e. "Closed #432"). Performing an HTML PUT to this resource will process any actions that are present in the commit message. Note that the actions will only be process if "Powerful Commit Messages" are active for the given repository.
- URL:
- /api/v1/repositories/{id}/changesets/{id}/process_message_actions[PUT]
- /api/v1/projects/{id}/changesets/{id}/process_message_actions [DEPRECATED][PUT]
- Response Formats:
- XML, JSON
- Response Body:
- See Changeset Data Model
- Example:
-
curl -i -u username:password -X PUT \ -H 'Accept: application/xml' \ http://mysubdomain.unfuddle.com/api/v1/projects/3455/changesets/98673/process_message_actions.xml
