Dispatches from the intrepid tinkerers behind technology at Tumblr.
    • The Team
    • 61cygni
      61 Cygni
    • david
      David's Log
    • derekg
      Derek Gottfrid
    • evan
      Fluff Overflow
    • matthew
      Matt Hackett
    • mobocracy
      Blake Matheny
    • nylandr
      nylandr
    • strle
      Strle
    • andrew
      andrew.tumblr.com
    • bennett
      Bennett
    • buzz
      Buzz Andersen
    • captphunkosis
      Capt Phunkosis
    • codingjester
      /geek
    • dallas
      dallas marlow
    • dorkmatt
      dorkytum
    • haseman
      small screens
    • jstn
      JSTN
    • michael
      Michael Schenck
    • pauwow
      pau
    • radioon
      RADIO_ON
  • Introducing Tumblr’s New API

    Neu! veranstaltung Blogs Templates User

    Welcome to the Tumblr API, v2!

    Want to know what’s changed and why? Read on. Just want to dive in? Head on over to the API documentation, sign up for a key, and get hacking!

    New Features

    Features on Tumblr evolve rapidly. With the API, we have not attempted to provide complete feature parity with the website. Instead, we’ve focused on those features which have become widely adopted and thus core to the experience.

    Just a few examples of features now exposed in the API:

    • Followers: Once authorized by a user, an application can access the list of blogs a user is following.
    • Photosets: Upload multiple photos to create Photoset posts.
    • Blog Info: Pull a blog’s description, avatar, and last-update time.

    Consolidation and Clarification

    The previous version of the API made distinctions between read and write operations and pushed different activity to different domains (www.tumblr.com and the blog subdomain). To make developers’ lives easier, we have consolidated all API access to api.tumblr.com and made visible our two major concepts in the URI: /blog and /user. By exposing developers to our core organizing principles, we hope they can have clearer mental model of how the different aspects of Tumblr fit together. In addition, having all API access consolidated under one domain allows us to cleverly measure and balance traffic using DNS and other mechanisms.

    Favoring Experimentation over Documentation

    Developers should be able to easily discover and experiment with an API without having to dig through piles of documentation. The URLs should follow a pattern, be guessable, and the responses should be self-describing. While I think we’ve come close to reaching our goal, there will probably come a time when you’ll need exact descriptions for thing like what the value of “updated” means in the followers call or what fields need to be passed back when reblogging a post. We’ve rewritten our documentation to provide a concise explanation of each of these more finicky details in an easily scannable format.

    Names

    Strict REST is great dogma that’s difficult to practice. Instead of attempting to be completely “RESTful,” we created simple URLs that enable composability for the average human.

    For example, developers commonly need to pull a blog’s avatar. Knowing just the URL of your favorite blog makes this as simple as http://api.tumblr.com/v2/blog/derekg.org/avatar, which returns a sane default size. If you want something bigger, append the size and you’ve got it: http://api.tumblr.com/v2/blog/derekg.org/avatar/512

    Result Formatting

    In the first version of our API, data was available in XML, with JSON support added largely as an afterthought. XML as a means for delivering developer-friendly data hasn’t aged well. Seeing the growing inclination of developers and API makers alike towards JSON, we’ve decided to eliminate XML support and put the energy spent there into getting our JSON implementation just right.

    Tracking and Authorization

    Protecting our community’s security and privacy is top priority, which was not reflected well by the fact that our earlier API allows developers to store passwords on behalf of users. With the implementation of the new API, OAuth 1.0a is now required to access all non-public data. While OAuth 1.0a has some learning curve, we feel it strikes a reasonable balance between user security and developer productivity. OAuth 2 looks promising, and we hope to make that available at some point in the future.

    We’ve also added a requirement for non-authenticated reads to provide an API key. This helps us better measure API usage without relying on IP addresses alone to tell us how and by whom the API is being used. This will permit us not only to more readily identify and eliminate the rare bad actors, but better understand the needs and use cases of legitimate apps. Hat tip to our friends at SoundCloud, who inspired us to re-use the OAuth 1.0a consumer key as our non-authenticated API key.

    derekg
    Derek Gottfrid
    3544 notes
    Jul 12, 2011
    1. billrt reblogged this from engineering
    2. paris-sportif1 liked this
    3. seo----service reblogged this from engineering
    4. auto-repair-x reblogged this from engineering
    5. thai4you liked this
    6. premature--ejaculation-exercises reblogged this from engineering
    7. electric-jack-hammer reblogged this from engineering
    8. new-short-hairstyles reblogged this from engineering
    9. short-curly-haircuts reblogged this from engineering
    10. nails-lincoln reblogged this from engineering
    11. voluspa-candles reblogged this from engineering
    12. folding-table reblogged this from engineering
    13. personal-injury-claims reblogged this from engineering
    14. rapidshare-files-download reblogged this from engineering
    15. tamil--news reblogged this from engineering
    16. social-media-agencies reblogged this from engineering
    17. deer-antler-spray reblogged this from engineering
    18. seattle-marketing reblogged this from engineering
    19. mercedes-benz-ml350 reblogged this from engineering
    20. click-to-call reblogged this from engineering
    21. short-wavy-hairstyles reblogged this from engineering
    22. qooy reblogged this from engineering
    23. the-cost-of-mail-order-brides reblogged this from engineering
    24. garage-floor-paint reblogged this from engineering
    25. cheatsapp reblogged this from engineering
    26. theamazingzone reblogged this from engineering
    27. college-books-free reblogged this from engineering
    28. watch-boxes reblogged this from engineering
    29. greekseo reblogged this from engineering
    30. underwiresportsbra liked this
    31. woodworkingplansx reblogged this from engineering
    32. comunicazioneweb reblogged this from engineering
    33. kataskeuh-istoselidwn reblogged this from engineering
    34. jessica-simpson-handbags reblogged this from engineering
    35. horoscop-urania liked this
    36. horoscop-urania reblogged this from engineering
    37. mobile-home-for-rent reblogged this from engineering
    38. street-smart-profits reblogged this from engineering
    39. joyce345 liked this
    40. vanilla-wow-private-server reblogged this from engineering
    41. cincinnati-web-design reblogged this from engineering
    42. makeyourbuttocksbiggernaturally reblogged this from engineering
    43. how-to-make-my-buttocks-bigger reblogged this from engineering
    44. online--fax reblogged this from engineering
    45. how-to-make-your-buttocks-bigger reblogged this from engineering
    46. car--insurance--comparison reblogged this from engineering
    47. green-ideass reblogged this from engineering
    48. website-design-mauritius reblogged this from engineering
    49. tmj-cure reblogged this from engineering
    50. fapturbo-review reblogged this from engineering
    51. Show more notesLoading...
  • © 2008–2011 All rights reserved.
    TUMBLR is a registered trademark of Tumblr, Inc.