Using the Basecamp API to Create Project Reports
A few months ago I wrote a post describing the benefits of using project collaboration software. It helps team members communicate, it avoids information hording, and at any time management can check in and see a project’s progress. 
At my job we use BaseCamp. It is a paid product that is extremely powerful and truly helpful. BaseCamp allows you to get projects done, and in my experience does not seem to add a layer of distracting work or complexity. Its features include a wiki, messaging system, a place to store files, and even chat. There is a tool for almost every group’s style. But for my purposes it was lacking some much needed reporting features. This is by design. The creators of BaseCamp felt that instead of developing tons of reports that never to EXACTLY what everyone needs, they would build an API. With the API, you could then in theory build reports that suit your specific needs.
We have a weekly managers meeting where we briefly run down all our open projects and their status. The responsible party can then update and if necessary elaborate briefly on specific items within their project. It is a great meeting to have because it gets all parties from various groups in one room where we quickly keep everyone abreast of the projects being worked on. People in theory can get all the same information from BaseCamp themselves, but reality is this is not always the case. Having the meeting lets us discuss small items with other groups and departments without having to have a longer time consuming meeting.
To create a report for this meeting, I decided to try the BaseCamp API. I figured a quick report that can generate a concise PDF to print out and bring to the meeting will work best. I sat down and used my regular tech community channels to see if anyone has created a BaseCamp API module for ColdFusion. Sure enough, I found baseCamp.cfc from Terrence Ryan. It was exactly what I was looking for. It was written for the older BaseCamp API, so I had to plug in some new methods, but it was a real time saver because it handled all the requests, and parsing of the responses.
I created a report that gathers the list of open projects and their details. First you login with your BaseCamp credentials. Hers is something to take note of. The API code is now logged in as you. If you are creating a report of all the projects to share, then you MUST login as a user who has access to all the projects. It needs to be your account creator, or very high level user. Alternatively, you can simply create a user called reports, and have them automatically added to ALL projects. Then hardcode your API tool to login as this user, and you will have the highest level access to print accurate reports.
Once logged in I grab all the active projects. Then I loop through the project list and make additional API calls to collect the open to-dos and incomplete milestones for each project. Then when I have all my data, I loop through all this information, and format the projects with all their remaining work and due dates.
I also created a longer report that retrieves closed items as well, and adds some more verbose details.
I also had a second need for a report. I have a group of developers that report to me. Each week we go over their assigned tasks and discuss progress. It also gives us a good chance to discuss common problems others may have come across, and share information. The first few weeks after implementing BaseCamp, I was forced to click on every project and then see what was assigned to who, or click on every person and grab their assigned to-do list. The second option was better than the first, but both were little wasteful and time consuming.
Instead, I created a report. First I retrieve all active users from BaseCamp. I display those names as a series of checkboxes. Now any user I csn scroll through the list, and grab the assignments for all the users they checked off at one time. When I loop through the user list, I grab each to-do assigned to them. I can also collect the project information and group the report together by project. So now we can simply review the list of projects and the assignments as a team. It helped keep my meeting organized and productive.
Once I retrieve all the BaseCamp info, parse it, and output it, I have an HTML and PDF view of the reports. Converting output to PDF is extremely simple in ColdFusion, and this gives me great flexibility. Now we can print out a stack of reports when needed, or in the case of my personal group’s meeting, I can simply view it on the computer.
BaseCamp and ColdFusion really paired nicely using the API. I have another report I plan to code soon, involving timesheets. I plan to be able to create timesheets based on project, person, and for various timeframes. I will keep you updated on how it goes.
Does anyone else use the BaseCamp API for their needs? Please share your ideas and experiences in the comments section. I’d love to get new ideas to make BaseCamp even more useful.
image by nataliej
Sphere: Related Content



They will not replace you primary computer, but now that specialized devices like the Kindle and iPhone are becoming so popular, I suggest you look to a netbook instead. Rather than getting a device that is just like a computer, why not actually buy an actual computer. They are small, relatively powerful, and cheap. I have a