Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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?

share|improve this question

closed as off topic by Eight Days of Malaise, Barry Oct 10 '11 at 10:11

Questions on Web Applications Stack Exchange are expected to relate to web applications within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

3 Answers 3

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.

Kind regards, Adrian

share|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
add comment

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

https://github.com/d-snp/Devbot/blob/master/modules/trello.rb

Useful parts:

        @trello = Mechanize.new
        @trello.post("https://trello.com/authenticate",
                     :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.

share|improve this answer
add comment

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