While the initial feature set of Trello is impressive, there is one feature that is missing that is keeping me from being able to use this with one of my primary clients: Configurable email notifications (my client would like email summaries sent out every hour rather than every 24 hours.) While making the email notifications configurable would be the ideal solution, having read-only access to the at-present-time unpublished API would facilitate the ability to write my own service in a couple hours that would easily tide me over to if/when this capability is implemented.

In the above regard, does anyone know when access to the read-only API will be made available for external access?


Access to the Trello API (Beta) is available now at https://trello.com/api

Documentation for the Trello API is at https://trello.com/docs

| improve this answer | |

I wrote an IRC bot that tracks Trello activities. Perhaps the source can be of help to you.


Useful parts:

        @trello = Mechanize.new
                     :user => $config["trello"]["user"],
                     :password => $config["trello"]["password"],
                     :returnUrl => '/')

        result = @trello.get "https://trello.com/data/board/#{$config["trello"]["board_id"]}/current"

That will fetch you the entire board data in json format. I can recommend browsing through the object with Chrome or Firebug (firefox extension). In my bot I make use of only the activities and the members arrays.

| improve this answer | |

I don't have an answer per se, but I am trying to work one out myself so I thought I'd chip in.

I need read-only api-style access too. I used Firebug to see where the data comes from, and it looks like there's actually a perfect data source already -- if I could get the json from the 'current' action in the board controller back, that would give me everything I need.

I'm trying to do it using a WebClient request in .NET, but I'm getting the empty board HMTL, not the JSON. If I browse directly to the /board/name/board-id/current path I get the same thing. I can't see what's different about the AJAX-ified request that causes it to return JSON.

Is there something I'm missing? This is roughly what I'm doing:

byte[] data = null;

using (WebClient client = new WebClient())
  client.Headers["Cookie"] = "entire-cookie-string-copied-from-firebug-headers, including Token=...";
  client.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1";
  client.Headers["Referer"] = "https://trello.com/board/test/4e8ecf9bec9da200008a733a";
  client.Headers["Host"] = "trello.com";
  client.Headers["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
  client.Headers["Accept-Charset"] = "ISO-8859-1,utf-8;q=0.7,*;q=0.7";
  client.Headers["Cache-Control"] = "max-age=0";

  data = client.DownloadData("https://trello.com/board/test/4e8ecf9bec9da200008a733a/current");

If somebody could help me get this working, I'm sure it'd be a good substitute for a read-only API until one is ready?

Right now, the alternative for me is writing a chrome extension and leaving it open on a headless machine or some such.

| improve this answer | |
  • Adrian, try changing your "Accept" header to be "application/json". Thats the field that tells the server what format you'd like the response to come back in. Currently you are asking for HTML. Switch it to JSON and you should get what you want. – Pete Duncanson Oct 24 '11 at 9:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.