PLEASE READ - API 2.0 update and info thread ***UPDATED 12/2/14***

ChestoneChestone Registered Users Posts: 2 Beginner grinner
Watch this thread for important updates. Last update 12/2/14.

***** Update 12/2/14 *****

We're excited to announce that the API 2.0 beta is open for everyone to use! It is a beta, so there may be rough edges, but we'd love to get people using it and giving us feedback. Learn all about the new API here: https://api.smugmug.com/api/v2/doc

For anyone that already has an API key, you can get access to 2.0 by visiting this page and accepting our new terms of service.
If you don't have an API key yet or you're looking to get another, you can visit this form and apply for an additional one. Just make sure to accept the beta terms of service if you want 2.0 access.

For now you’ll still have access to API versions 1.3.0 and 1.2.2, but we’ll only update them for essential, critical fixes. We’ll keep you updated on when 2.0 is out of beta, as well as a timeline for phasing out and shutting down APIs 1.3.0 and 1.2.2. We’ll be sure the timeline gives you plenty of time for you to migrate your apps.

As usual, if you have any questions/comments/concerns, give us a shout at api@smugmug.com.

***** Update 6/30/14 *****

Some of you may have heard rumblings of SmugMug’s API 2.0, which we’ve been testing to ensure it’s up to snuff. Credit to the people who discovered it and started playing with it. :-) Unfortunately, the unfinished version that's in the wild isn't ready for prime time.

Knowing that a few folks here have found the new API and have been playing with it, we wanted to give you a heads up that we need to restrict access until it’s ready for official launch. We know, that sounds corporate...but it has begun to make its way into some important products before it's ready. We should’ve restricted it from the start, but we missed it. We apologize!

We'll be putting the restriction into place two days from now. If this change affects you, contact us at api@smugmug.com. We’ll work with you as best we can.

***** Original Post *****

Hey SmugMug API Geeks!

I bring news from the API team at SmugMug. As part of the team at SmugMug working on the new version of the API (2.0 we are calling it); I wanted to let you know that we are still very hard at work on bringing you a new and more useful way of using the SmugMug platform. I realize that it has been awhile since anyone has really chimed in with information on the new version of the API. I'd still like to give all of you some sort of status update.

We’ve been heads-down at work building you:
  • Entirely new features to make you more productive
  • A battle-tested, stable API
  • Better documentation with sample code
  • Transition documents for those of you already working with the existing API

I really cannot wait to be able to speak about the new version of the API and introduce all of its new features, but we want to make sure that the code and infrastructure have been tested as well as it could be to bring you a stable and useful platform to develop with.

I will update this thread with more details when the new API is closer to public release. Until then, we are working hard to bring you a brand-new, more productive, powerful API suitable for the future of developing with SmugMug.

We will add updates to this sticky thread so subscribe to it for the latest info on API 2.0.

Comments

  • thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited February 23, 2014
    Exciting news, thanks!

    A quick question about authentication if you can - will the v2 API use similar OAuth authentication to the 1.3.0 API, or will there be a new authentication mechanism?
  • gluwatergluwater Registered Users Posts: 3,599 Major grins
    edited February 23, 2014
    Lamah wrote: »
    Exciting news, thanks!

    A quick question about authentication if you can - will the v2 API use similar OAuth authentication to the 1.3.0 API, or will there be a new authentication mechanism?
    Lamah we plan to continue using OAuth for Authentication.
    Nick
    SmugMug Technical Account Manager
    Travel = good. Woo, shooting!
    nickwphoto
  • MarcusTMarcusT Registered Users Posts: 25 Big grins
    edited March 4, 2014
    Sounds promising! Please confirm you are finally going to document the full list of "Extras" parameters or replace them like-for-like with something else that is fully documented?
  • ChestoneChestone Registered Users Posts: 2 Beginner grinner
    edited March 5, 2014
    Marcus,

    There will indeed be documentation for the full list of additional query params at launch.
  • wezzixwezzix Registered Users Posts: 5 Big grins
    edited April 14, 2014
    Will there be any support for adding additional content, like managing html blocks in galleries and pages?
  • IIMMIIMM Registered Users Posts: 9 Beginner grinner
    edited April 25, 2014
    2.0 Feature Requests
    Hello,

    Please consider adding the following features to API 2.0 -- if possible. I can't be the only SmugMugger who would greatly benefit from them.

    -Include the DateCreated parameter to albums.get method (allowing us a way to intelligently sort album return values)

    It's sort of redundant to have to go into every single album and grab an image only to reference the Date field. The only date-associated field that album.get seems to pull is the "LastUpdated". This was fine until we recently had to apply new watermarks to all of our albums so now most of our albums share the same "LastUpdated" value.

    -Include additional way(s) to sort API returns

    I really like using RSS feeds as they tend to show the most recently uploaded content first but I've ran into issues with the return limit (100 images on a keyword feed, for example). More specifically, if I use the albums.get method to pull all albums associated with a particular subcategory (or keyword) the returned albums don't seem to be in any particular order. Ideally, I'd like to return the most recent albums first much like the RSS feeds do. I guess this particular instance would be satisfied if the feature above was implemented.

    Thanks for your time!
  • thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited April 25, 2014
    IIMM, the v2 API as implemented so far does include a DateCreated parameter for albums (named Date), which appears in the Full response level (i.e. you must be authenticated to the account to see it, it isn't visible to the public). It also allows albums to be sorted by Last Modified times, at least within the context of listing albums for a particular user. I'm not sure if the API includes album search by keyword.
  • ckelleyckelley Registered Users Posts: 26 Big grins
    edited April 28, 2014
    Please support Gallery search by URL startswith
    Hello,

    I'm using SmugMug API 1.2.2 to retrieve galleries by the leading characters of their custom URL.

    To do so, I now have to retrieve all galleries and then filter through the list.

    I'm hoping that you will make this more efficient in API 2.0
  • IIMMIIMM Registered Users Posts: 9 Beginner grinner
    edited May 2, 2014
    Lamah wrote: »
    IIMM, the v2 API as implemented so far does include a DateCreated parameter for albums (named Date), which appears in the Full response level (i.e. you must be authenticated to the account to see it, it isn't visible to the public). It also allows albums to be sorted by Last Modified times, at least within the context of listing albums for a particular user. I'm not sure if the API includes album search by keyword.

    Great! Thank you for the immediate feedback on this.

    Could you provide any clarity on whether v2 API will support referencing category/subcategory (folder level) keywords with a heavy response? API 1.3.0 can only address keywords at the album/image level even though you can technically add keywords to any category or subcategory.

    Thanks!
  • thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited May 2, 2014
    Yep, you can see the keywords of folders with no issue. You can play with this interactively with the v2 API HTML interface:

    http://www.sherlockphotography.org/api/v2/folder/user/n-sherlock!folders

    You can even pass parameters to the V2 API to restrict the fields that will be returned (so that the response is smaller and quicker to download), for example:

    http://www.sherlockphotography.org/api/v2/folder/user/n-sherlock!folders?_filter=WebUri,Uri,Keywords&_shorturis=

    The only folder I have with keywords set is #6/22, the "/Travel" folder.
  • IIMMIIMM Registered Users Posts: 9 Beginner grinner
    edited May 5, 2014
    Lamah wrote: »
    Yep, you can see the keywords of folders with no issue. You can play with this interactively with the v2 API HTML interface:

    http://www.sherlockphotography.org/api/v2/folder/user/n-sherlock!folders

    You can even pass parameters to the V2 API to restrict the fields that will be returned (so that the response is smaller and quicker to download), for example:

    http://www.sherlockphotography.org/api/v2/folder/user/n-sherlock!folders?_filter=WebUri,Uri,Keywords&_shorturis=

    The only folder I have with keywords set is #6/22, the "/Travel" folder.

    Thanks again for the hasty reply!

    Looking forward to working with the new API and dynamically displaying our content throughout our other web applications.

    Best!

    D.S.
  • slushpupieslushpupie Registered Users Posts: 3 Big grins
    edited May 7, 2014
    Is there any way to begin using the new v2 API before its finished, like a beta program or something? Lamah's site shows some interesting potential and I'd like to get my app working with it.
  • thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited May 7, 2014
    IMHO, I'd say you can start sending (unauthenticated) read requests to the new API right away. The API will certainly change between now and when it is formally released, but you would get a big headstart on development. For me, I found it easy enough to understand the API just by using the interactive API browser:

    http://api.smugmug.com/api/v2

    Once you've found an interesting URL using the browser:

    http://api.smugmug.com/api/v2/user/n-sherlock

    You can get the equivalent request URL that'd be useful in your app by choosing something like application/json from the Available Media Types menu at the bottom, giving you a URL like this:

    http://api.smugmug.com/api/v2/user/n-sherlock?_accept=application%2Fjson

    It's possible that you can just add oauth credentials onto the URL the same way you would with the v1.3 API (I've never tried). The SM extension for Lightroom passes these oauth parameters in the URL:
    GET /api/v2/album/xxxxx?oauth_version=1.0&oauth_signature=xxxx&oauth_signature_method=HMAC-SHA1&oauth_token=xxxx&oauth_consumer_key=xxxx&oauth_nonce=xxxx&oauth_timestamp=1399472661
    

    To be clear, the v2 API is enabled for every site, not just mine (because SM for Lightroom and other consumers already rely on it).
  • slushpupieslushpupie Registered Users Posts: 3 Big grins
    edited May 7, 2014
    Lamah wrote: »
    IMHO, I'd say you can start sending (unauthenticated) read requests to the new API right away. The API will certainly change between now and when it is formally released, but you would get a big headstart on development. For me, I found it easy enough to understand the API just by using the interactive API browser:

    Yeah, it looks easy enough to work with. I did play with that some. I even wrote some code to start, but most of what I want will rely on authenticated requests.
    Lamah wrote: »
    It's possible that you can just add oauth credentials onto the URL the same way you would with the v1.3 API (I've never tried). The SM extension for Lightroom passes these oauth parameters in the URL:
    GET /api/v2/album/xxxxx?oauth_version=1.0&oauth_signature=xxxx&oauth_signature_method=HMAC-SHA1&oauth_token=xxxx&oauth_consumer_key=xxxx&oauth_nonce=xxxx&oauth_timestamp=1399472661
    

    I just tried, and got a 403 Unauthorized, so I guess they are perhaps limiting it to specific whitelisted applications.
  • gabbiegabbie Registered Users Posts: 66 Many Grins
    edited June 30, 2014
    Hey DGrinners,

    Some of you may have heard rumblings of SmugMug’s API 2.0, which we’ve been testing to ensure it’s up to snuff. Credit to the people who discovered it and started playing with it. :-) Unfortunately, the unfinished version that's in the wild isn't ready for prime time.

    Knowing that a few folks here have found the new API and have been playing with it, we wanted to give you a heads up that we need to restrict access until it’s ready for official launch. We know, that sounds corporate...but it has begun to make its way into some important products before it's ready. We should’ve restricted it from the start, but we missed it. We apologize!

    We'll be putting the restriction into place two days from now. If this change affects you, contact us at api@smugmug.com. We’ll work with you as best we can.
    gabbie
    SmugMug Product Manager
  • fitter manfitter man Registered Users Posts: 9 Beginner grinner
    edited July 8, 2014
    I want to build an uploader that can take advantage of the gallery, folders and page structure as it exists in the latest version of Smugmug. Does this mean that there is no way for me to do that right now?
  • lildudelildude Registered Users Posts: 70 Big grins
    edited July 9, 2014
    fitter man wrote: »
    I want to build an uploader that can take advantage of the gallery, folders and page structure as it exists in the latest version of Smugmug. Does this mean that there is no way for me to do that right now?

    You can take full advantage of the current structure and successfully upload pictures using the 1.3.0 API. There's no need to use the 2.0 API.
  • ktvoelkerktvoelker Registered Users Posts: 25 Big grins
    edited July 9, 2014
    lildude wrote: »
    You can take full advantage of the current structure and successfully upload pictures using the 1.3.0 API. There's no need to use the 2.0 API.

    The 1.3.0 API does not fully expose the deeper folder structures that are possible with the new SmugMug. But you can get a list of all albums, whether they are deeply nested or not, so it is still possible to upload to any existing gallery.
    Karl Voelker
    Sorcerer and API Guy at SmugMug
  • gabbiegabbie Registered Users Posts: 66 Many Grins
    edited July 9, 2014
    We currently have a closed beta underway for API 2.0. If anyone would like to be placed on the list to be invited to the beta, e-mail us at api@smugmug.com. Please include the details of what you would be working on and our team will get back to you with more information.
    gabbie
    SmugMug Product Manager
  • ckelleyckelley Registered Users Posts: 26 Big grins
    edited July 14, 2014
    Multi-file uploader on API 1.2.2
    fitter man wrote: »
    I want to build an uploader that can take advantage of the gallery, folders and page structure as it exists in the latest version of Smugmug. Does this mean that there is no way for me to do that right now?

    I just built a multi-file uploader on API 1.2.2 that posts back to ASP.NET web site. It works just fine, but you'll need to map some terminology:
    • Gallery => Album in 1.2.2
    • Top Folder => Category in 1.2.2
    • Sub-Folder => Subcategory in 1.2.2
    • Custom URL => Album/Category/Subcategory Nicename
    I chose to use 1.2.2 instead of 1.3.0 because 2.0 wasn't available and I found a robust .NET sample project in 1.2.2.
  • slushpupieslushpupie Registered Users Posts: 3 Big grins
    edited September 8, 2014
    ktvoelker wrote: »
    The 1.3.0 API does not fully expose the deeper folder structures that are possible with the new SmugMug. But you can get a list of all albums, whether they are deeply nested or not, so it is still possible to upload to any existing gallery.

    I've found this not to be the case. albums.get only returns albums that are no deeper 2 folders (so they can be mapped to Category->Subcategory). The majority of my photos are organized by "Dated/YYYY/MMDD/photo.jpg" so none of those MMDD albums show up via the 1.3.0 API for me. I have a few albums that are higher up, and I even tested that ( "Other/Test/foo.jpg" works, for example)

    This is pretty frustrating for me, because I used to just have everything organized by "Dated/YYYYMMDD" but with the newer layout, I had too many albums in a folder and was forced to split my organization up a bit more. So none of the tools I used previously work since that change, and there has been nearly no updates on the upcoming 2.0 API and the "new" site has been live for over a year now. :pissed

    If anyone has some suggestions about how to make the existing APIs access deep folders, Id love to hear them. Maybe Im just doing something wrong.
  • ktvoelkerktvoelker Registered Users Posts: 25 Big grins
    edited September 9, 2014
    You should be able to get all albums with 1.3.0, even deeply-nested ones. If you could send more details about the API request you are making to api@smugmug.com, we will help you out.
    Karl Voelker
    Sorcerer and API Guy at SmugMug
  • gabbiegabbie Registered Users Posts: 66 Many Grins
    edited December 2, 2014
    Open Beta
    Hey folks!

    We're excited to announce that the API 2.0 beta is open for everyone to use! It is a beta, so there may be rough edges, but we'd love to get people using it and giving us feedback. Learn all about the new API here: https://api.smugmug.com/api/v2/doc

    For anyone that already has an API key, you can get access to 2.0 by visiting this page and accepting our new terms of service.
    If you don't have an API key yet or you're looking to get another, you can visit this form and apply for an additional one. Just make sure to accept the beta terms of service if you want 2.0 access.

    For now you’ll still have access to API versions 1.3.0 and 1.2.2, but we’ll only update them for essential, critical fixes. We’ll keep you updated on when 2.0 is out of beta, as well as a timeline for phasing out and shutting down APIs 1.3.0 and 1.2.2. We’ll be sure the timeline gives you plenty of time for you to migrate your apps.

    As usual, if you have any questions/comments/concerns, give us a shout at api@smugmug.com.
    gabbie
    SmugMug Product Manager
  • NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited December 10, 2014
    Thank you for the update.
    "May the f/stop be with you!"
Sign In or Register to comment.