Basecamp API

An overview of the basecamp api by jonathan yankovich »
Jonathan Yankovich

/projects.xml
/projects/#{project_id}/
companies.xml
/projects/#{project_id}/
categories.xml
(?type=[post|attachment])
/projects/#{project_id}/
posts.xml
/todo_lists/#{todo_list_id}
/todo_items.xml
/projects/#{project_id}/
todo_lists.xml
?filter=#{filter}
/comments/#{comment_id}.xml
/projects/#{project_id}/
time_entries.xml
/projects/#{project_id}
milestones/list
/people.xml
...
/account.xml
/companies/#{company_id}/people.xml
/people/#{person_id}.xml
Just the GETs!
/posts/#{id}.xml
/projects/#{project_id}/cat/
#{category_id}/posts.xml
/projects/#{project_id}/posts/
archive.xml
/projects/#{project_id}/cat/
#{category_id}/posts/archive.xml
/projects/#{project_id}/posts/
new.xml
companies
categories
messages
/#{resource}/#{resource_id}/
comments.xml
comments
to-do lists
to-do list items
milestones
time tracking
/todo_lists/#{id}.xml
/todo_lists.xml?
responsible_party=#{id}
/todo_items/#{id}.xml
Complete item
PUT /todo_items/#{id}/complete.xml
Marks the specified todo item as completed.


...
/todo_items/#{todo_item_id}/
time_entries.xml
<post>
  <id type="integer">#{id}</id>
  <title>#{title}</title>
  <posted-on type="datetime">#{posted_on}</posted-on>
  <attachments-count type="integer">#{attachments_count}</attachments-count>
  <category>
    <id type="integer">#{id}</id>
    <name>#{name}</name>
  </category>
</post>
<post>
  <id type="integer">#{id}</id>
  <title>#{title}</title>
  <posted-on type="datetime">#{posted_on}</posted-on>
  <attachments-count type="integer">#{attachments_count}</attachments-count>
  <category>
    <id type="integer">#{id}</id>
    <name>#{name}</name>
  </category>
</post>
<category>
  <id type="integer">#{id}</id>
  <name>#{name}</name>
  <project-id type="integer">#{project_id}</project-id>
  <elements-count type="integer">#{elements_count}</elements-count>
  <type>#{type}</type>
</category>
<company>
  <id type="integer">#{id}</id>
  <name>#{name}</name>
  <address-one>#{address_one}</address-one>
  <address-two>#{address_two}</address-two>
  <city>#{city}</city>
  <state>#{state}</state>
  <zip>#{zip}</zip>
  <country>#{country}</country>
  <web-address>#{web_address}</web-address>
  <phone-number-office>#{phone_number_office></phone-number-office>
  <phone-number-fax>#{phone_number_fax}</phone-number-fax>
  <time-zone-id>#{time_zone_id}</time-zone-id>
  <can-see-private type="boolean">#{can_see_private}</can-see-private>

  <!-- for non-client companies -->
  <url-name>#{url_name}</url-name>
</company>
<comment>
  <id type="integer">#{id}</id>
  <author-id type="integer">#{author_id}</author-id>
  <commentable-id type="integer">#{commentable_id}</commentable-id>
  <commentable-type>#{commentable_type}</commentable-type>
  <body>#{body}</body>
  <emailed-from nil="true">#{emailed_from}</emailed-from>
  <attachments-count type="integer">#{attachments_count}</attachments-count>
  <created-at type="datetime">#{created_at}</created-at>
</comment>
<todo-list>
  <id type="integer">#{id}</id>
  <name>#{name}</name>
  <description>#{description}</description>
  <project-id type="integer">#{project_id}</project-id>
  <milestone-id type="integer">#{milestone_id}</milestone-id>
  <position type="integer">#{position}</position>

  <!-- if user can see private lists -->
  <private type="boolean">#{private}</private>

  <!-- if the account supports time tracking -->
  <tracked type="boolean">#{tracked}</tracked>

  <!-- if todo-items are included in the response -->
  <todo-items type="array">
    <todo-item>
      ...
    </todo-item>
    <todo-item>
      ...
    </todo-item>
    ...
  </todo-items>
</todo-list>
<todo-item>
  <id type="integer">#{id}</id>
  <todo-list-id type="integer">#{todo_list_id}</todo-list-id>
  <content>#{content}</content>
  <position type="integer">#{position}</position>
  <created-on type="datetime">#{created_on}</created-on>
  <creator-id type="integer">#{creator_id}</creator-id>
  <completed type="boolean">#{completed}</completed>
  <comments-count type="integer">#{comments_count}</comments-count>

  <!-- if the item has a responsible party -->
  <responsible-party-type>#{responsible_party_type}</responsible-party-type>
  <responsible-party-id type="integer">#{responsible_party_id}</responsible-party-id>

  <!-- if the item has been completed -->
  <completed-on type="datetime">#{completed_on}</completed-on>
  <completer-id type="integer">#{completer_id}</completer-id>
</todo-item>
<milestone>
  <id type="integer">#{id}</id>
  <title>#{title}</title>
  <deadline type="date">#{deadline}</deadline>
  <completed type="boolean">#{true|false}</completed>
  <project-id type="integer">#{project_id}</project-id>
  <created-on type="datetime">#{created_on}</created-on>
  <creator-id type="integer">#{creator_id}</creator-id>
  <responsible-party-id type="integer">#{responsible_party_id}</responsible-party-id>
  <responsible-party-type>#{responsible_party_type}</responsible-party-type>
  <comments-count type="integer">#{comments_count}</comments-count>

  <!-- if the milestone has been completed -->
  <completed-on type="datetime">#{completed_on}</completed-on>
  <completer-id type="integer">#{completer_id}</completer-id>
</milestone>
<time-entry>
  <id type="integer">#{id}</id>
  <project-id type="integer">#{project-id}</project-id>
  <person-id type="integer">#{person-id}</person-id>
  <date type="date">#{date}</date>
  <hours>#{hours}</hours>
  <description>#{description}</description>
  <todo-item-id type="integer">#{todo-item-id}</todo-item-id>
</time-entry>
<project>
  <id type="integer">#{id}</id>
  <name>#{name}</name>
  <created-on type="datetime">#{created_on}</created-on>
  <status>#{status}</status>
  <last-changed-on type="datetiem">#{last_changed_on}</last-changed-on>
  <company>
    <id type="integer">#{id}</id>
    <name>#{name}</name>
  </company>

  <!-- if user is administrator, or show_announcement is true -->
  <announcement>#{announcement}</announcement>

  <!-- if user is administrator -->
  <start-page>#{start_page}</start-page>
  <show-writeboards type="boolean">#{show_writeboards}</show-writeboards>
  <show-announcement type="boolean">#{show_announcement}</show-announcement>
</project>
<account>
  <id type="integer">1</id>
  <name>Your Company</name>
  <account-holder-id type="integer">1</account-holder-id>
  <ssl-enabled type="boolean">true</ssl-enabled>
  <email-notification-enabled type="boolean">true</email-notification-enabled>
  <time-tracking-enabled type="boolean">true</time-tracking-enabled>
  <updated-at type="datetime">2009-10-09T17:52:46Z</updated-at>
</account>
...
<person>
  <id type="integer">#{id}</id>
  <first-name>#{first_name}</first-name>
  <last-name>#{last_name}</last-name>
  <title>#{title}</title>
  <email-address>#{email_address}</email-address}
  <im-handle>#{im_handle}</im-handle>
  <im-service>#{im_service}</im-service>
  <phone-number-office>#{phone_number_office}</phone-number-office>
  <phone-number-office-ext>#{phone_number_office_ext}</phone-number-office-ext>
  <phone-number-mobile>#{phone_number_mobile}</phone-number-mobile>
  <phone-number-home>#{phone_number_home}</phone-number-home>
  <phone-number-fax>#{phone_number_fax}</phone-number-fax>
  <last-login type="datetime">#{last_login}</last-login>
  <client-id type="integer">#{client_id}</client-id>

  <!-- if user is an administrator, or is self -->
  <user-name>#{user_name}</user-name>

  <!-- if user is an administrator -->
  <administrator type="boolean">#{administrator}</administrator>
  <deleted type="boolean">#{deleted}</deleted>
  <has-access-to-new-projects type="boolean">#{has_access_to_new_projects}</has-access-to-new-projects>
</person>
<post>
  <id type="integer">#{id}</id>
  <title>#{title}</title>
  <body>#{body}</body>
  <posted-on type="datetime">#{posted_on}</posted-on>
  <project-id type="integer">#{project_id}</project-id>
  <category-id type="integer">#{category_id}</category-id>
  <author-id type="integer">#{author_id}</author-id>
  <milestone-id type="integer">#{milestone_id}</milestone-id>
  <comments-count type="integer">#{comments_count}</comments-count>
  <attachments-count type="integer">#{attachments_count}</attachments-count>
  <use-textile type="boolean">#{use_textile}</use-textile>
  <extended-body>#{extended_body}</extended-body>
  <display-body>#{display_body}</display-body>
  <display-extended-body>#{display_extended_body}</display-extended-body>

  <!-- if user can see private posts -->
  <private type="boolean">#{private}</private>
</post>
also
http://yoursite.basecamphq.com

An Activitystream plugin for basecamp.  Allows drupalistas to export various "content types" (object types) from 37signals' basecamp into drupal nodes.

This project is in the early development stages.

So far the module's initial goal is to support import of all todo lists and items for a project including comments.  (Attachments are not yet supported.  Wanna help?)

This prezi by jonathan yankovich shows the basecamp api components and will be updated as activitystream_basecamp supports more of the basecamp api:

http://valdev.org/prezi/?id=vapzqxsibx9j

Initial commit coming shortly.

Dependencies: activitystream

Sponsored by Bucket Brigade and All Systems Grow!


Scenes from the making of....
projects as
organic groups?
people 
as 
users
initial release
comment
id
created by user id
created at time
body
todo item
id
created by user id
created at time
title

todo list
id
created by user id
created at time
title

project
id
created by user id
created at time
title

person
id
created by user id
created at time
username
<password>
title

company
id
created by user id
created at time
title

entity relationships
basecamp to drupal

Loading comments...

Please log in to add your comment.

Report abuse

More presentations by Jonathan Yankovich

More prezis by author