Unfuddle API: Accounts
Introduction 
- Each Unfuddle subdomain has exactly one Account resource associated with it.
Account 
The Unfuddle Account. Contains very basic, high level information about the Account.
- URL:
- /api/v1/account[GET, PUT]
- Response Formats:
- XML, JSON, ICS
- Request/Response Body:
- See Account Data Model
- Example:
-
curl -i -u username:password -X PUT \ -H 'Accept: application/xml' \ -H 'Content-Type: application/xml' \ -d '<account><text-markup>textile</text-markup></account>' \ http://mysubdomain.unfuddle.com/api/v1/account.xml
Account Activity 
The activity for all Projects to which the requesting person has access. Query parameters can be passed via the query string parameters or in the request body. If no dates are given, activity for the last two weeks is returned.
- URL:
- /api/v1/account/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' \ -d '<request><start-date>5/5/2007</start-date><end-date>5/12/2007</end-date></request>' \ http://mysubdomain.unfuddle.com/api/v1/account/activity.xml
Account Search 
Searches through all projects to which the requester person has access for instances of the given query string. Query parameters can be passed via the query string parameter or in the request body.
- URL:
- /api/v1/account/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' \ -H 'Content-Type: application/xml' \ -d '<request><query>john support dashboard</query></request>' \ http://mysubdomain.unfuddle.com/api/v1/account/search.xml
Reset Access Keys 
Resets access keys for the account and for all users within the Account, thus invalidating all RSS and iCal feeds out in the wild.
- URL:
- /api/v1/account/reset_access_keys[PUT]
- Example:
-
curl -i -u username:password -X PUT \ -H 'Accept: application/xml' \ http://mysubdomain.unfuddle.com/api/v1/account/reset_access_keys
