• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug APIs, Hacks & Tricks new API release - March 31st, 2005

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #130 (Hot or Cold), Memol..

The next Dgrin Challenge DSS #131 (Music) is open for entries through June 24th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Page 1  of  3
1 2 3
Old Mar-31-2005, 10:24 PM
#1
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
new API release - March 31st, 2005
BIG changes! Here are the highlights:

- method names have dramatically changed. The old methods will still work, and probably will forever, but no promises. I strongly suggest you start using the new naming scheme. See the docs.

- new interface! REST! Some would argue it's even simpler than XML-RPC, and they might be right. See the docs.

- APIKeys! To curb abuse and increase our ability to track API usage, all uses of the API now require an API key. Easy to apply for, quick to obtain, you'll need it to use any of the new functions, new REST interface, etc. See the docs.

- New methods to let you manipulate Categories & SubCategories: rename, delete, etc.

- Stats methods to get hits and bytes sent per album and per photo.

- Bug fixes to quite a few methods to return the proper values (ints, bools, etc) and results.

I'm sure I've introduced bugs, so holler if you find some.

Don
Old Mar-31-2005, 10:47 PM
#2
devbobo is offline devbobo
technicolored
devbobo's Avatar
Don,

smugmug.images.get & smugmug.albumtemplates.get are returning method not found


David

Quote:
Originally Posted by onethumb
BIG changes! Here are the highlights:

- method names have dramatically changed. The old methods will still work, and probably will forever, but no promises. I strongly suggest you start using the new naming scheme. See the docs.

- new interface! REST! Some would argue it's even simpler than XML-RPC, and they might be right. See the docs.

- APIKeys! To curb abuse and increase our ability to track API usage, all uses of the API now require an API key. Easy to apply for, quick to obtain, you'll need it to use any of the new functions, new REST interface, etc. See the docs.

- New methods to let you manipulate Categories & SubCategories: rename, delete, etc.

- Stats methods to get hits and bytes sent per album and per photo.

- Bug fixes to quite a few methods to return the proper values (ints, bools, etc) and results.

I'm sure I've introduced bugs, so holler if you find some.

Don
__________________
David Parry
SmugMug API Developer
My Photos
Old Apr-01-2005, 05:44 AM
#3
rutt is offline rutt
Cave canem!
rutt's Avatar
Are you planning on maintaining xml-rpc as well as rest? I hope so. Python support of xml-rpc is first class, but not so for rest.

Don, I think it would be really great when you have a change like this that is going to break everything, to publish the documentation, changes, etc, in advance and give us some time to get ready. Please?
Old Apr-01-2005, 07:12 AM
#4
Cameron is offline Cameron
Major grins
Cameron's Avatar
Quote:
Originally Posted by rutt
Don, I think it would be really great when you have a change like this that is going to break everything, to publish the documentation, changes, etc, in advance and give us some time to get ready. Please?
I agree -- I first noticed my PHP script returning an error and dug through the code for a bit before I came here to read about the API changes. A simple "the API will be changing" heads-up would have been helpful, even without other details. Perhaps a 1 week "grace period" where API calls work without keys would have been helpful.
Old Apr-01-2005, 08:23 AM
#5
Nikolai is offline Nikolai
Darth SLR
Nikolai's Avatar
Thank you!
As long as the old functionality keeps working "as is", at least for the time being, I'm all up for the changes!

I agree, sort of advance notice would be nice, but hey, sometimes $%it just happens:-)

I'l looking forward to see the REST:-)

One question: is your intension to
1) support/uprdage *both* branches (rpx-aml & rest),
or
2) the rpc-xml gets to rest:-) and REST will be the "main" API?

Thanks again for keep an eye of this area!
__________________
"May the f/stop be with you!"
Star*Explorer: on Dgrin, home; Master Class: open;
Class is in session, My Facebook, @DarthSLR, #NiksTips
member: NAPP, PPA, partner: Adobe
Comprehending life, universe and everything - one pixel at a time
Old Apr-01-2005, 08:40 AM
#6
Cameron is offline Cameron
Major grins
Cameron's Avatar
Quote:
Originally Posted by Nikolai
As long as the old functionality keeps working "as is", at least for the time being, I'm all up for the changes!
I agree, but the old functionality isn't working "as is" -- I don't have an API Key yet and my scripts using the old API calls are failing due to 'invalid API key'.
Oh well - I'm sure once I get the API Key things will work very well. I think it's great that Don and the rest of the crew are so actively trying to make the API a useful and powerful tool.
Old Apr-01-2005, 08:59 AM
#7
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
Quote:
Originally Posted by rutt
Are you planning on maintaining xml-rpc as well as rest? I hope so. Python support of xml-rpc is first class, but not so for rest.

Don, I think it would be really great when you have a change like this that is going to break everything, to publish the documentation, changes, etc, in advance and give us some time to get ready. Please?
I did rigorous backwards compatibility testing so I really shouldn't have "broken everything".

Note what's not working that used to work and I'll get it fixed.

Don
Old Apr-01-2005, 09:01 AM
#8
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
Quote:
Originally Posted by CSwinton
I agree -- I first noticed my PHP script returning an error and dug through the code for a bit before I came here to read about the API changes. A simple "the API will be changing" heads-up would have been helpful, even without other details. Perhaps a 1 week "grace period" where API calls work without keys would have been helpful.
All existing functionality continues to work, without Keys.

Come on guys, I'm not that stupid. There's a huge grace period where all the old calls work, there's no key required for anything that was old, etc etc.

If something's not working, it's an honest mistake and a bug, not intentional. Tell me which call isn't working, rather than complaining with zero details. :)

Don
Old Apr-01-2005, 09:02 AM
#9
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
Obviously, the docs aren't clear enough, though it seems like it to me. :)

For the record: Both REST and XML-RPC will be jointly updated in lockstep. XML-RPC isn't going anywhere.

Of course, also for the record, the APIs are currently sans official support or endorsement. Use at your own risk. ;)

Don
Old Apr-01-2005, 09:04 AM
#10
rutt is offline rutt
Cave canem!
rutt's Avatar
Quote:
Originally Posted by onethumb
All existing functionality continues to work, without Keys.

Come on guys, I'm not that stupid. There's a huge grace period where all the old calls work, there's no key required for anything that was old, etc etc.

If something's not working, it's an honest mistake and a bug, not intentional. Tell me which call isn't working, rather than complaining with zero details. :)

Don
Sorry. Zero details is right. I didn't even test. I just read what you wrote and assumed that you were announcing that it wasn't going to work. Sorry if I read it wrong, but it wasn't 100% clear and I didn't sleep so great last night anyway.

I'll test and let you know.
Old Apr-01-2005, 09:08 AM
#11
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
Quote:
Originally Posted by devbobo
Don,

smugmug.images.get & smugmug.albumtemplates.get are returning method not found


David
Silly typos. I assume you were talking about the XML-RPC interface?

Try now. :)

Don
Old Apr-01-2005, 09:10 AM
#12
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
Quote:
Originally Posted by onethumb
BIG changes! Here are the highlights:
Oh, yeah, and the API endpoints changed again. Just to be clear, the old endpoints still work and should continue to work for a long long time, but I'd shift to using the new ones (which are permanent, now, I promise!) for all future work.

Don
Old Apr-01-2005, 09:18 AM
#13
rutt is offline rutt
Cave canem!
rutt's Avatar
Smugmug.py does seem to work. Next time I'll try to be more empirical. Sorry.

Thanks, Don, for all the work on this. It really is a pleasure to have this interface.
Old Apr-01-2005, 09:28 AM
#14
Cameron is offline Cameron
Major grins
Cameron's Avatar
Huh
Quote:
Originally Posted by onethumb
All existing functionality continues to work, without Keys.

Come on guys, I'm not that stupid. There's a huge grace period where all the old calls work, there's no key required for anything that was old, etc etc.

If something's not working, it's an honest mistake and a bug, not intentional. Tell me which call isn't working, rather than complaining with zero details. :)
Don
If I thought you were stupid would I be paying you money? Sorry for the lack of details. I have a PHP script and am using XMP_RPC (with old API for the moment). "loginWithPassword" fails due to 'invalid API key'. Using the API key I just received, it works perfectly. Any idea why the old call with the API key would fail? I'm not sure (being new to this) which other details would be helpful - please let me know what else you need.
Old Apr-01-2005, 09:46 AM
#15
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
Quote:
Originally Posted by CSwinton
If I thought you were stupid would I be paying you money? Sorry for the lack of details. I have a PHP script and am using XMP_RPC (with old API for the moment). "loginWithPassword" fails due to 'invalid API key'. Using the API key I just received, it works perfectly. Any idea why the old call with the API key would fail? I'm not sure (being new to this) which other details would be helpful - please let me know what else you need.
The API key for XML-RPC should only kick in if you're sending a Version that's equal to or greater than "1.1.0".

What Version are you sending?

Don
Old Apr-01-2005, 09:53 AM
#16
Cameron is offline Cameron
Major grins
Cameron's Avatar
Quote:
Originally Posted by onethumb
The API key for XML-RPC should only kick in if you're sending a Version that's equal to or greater than "1.1.0".

What Version are you sending?

Don
That was it - I was sending "1.1". Thanks for the quick replies and sorry for any confusion. I didn't think about version control in the API. That's what I get for posting messages on little sleep. Now I know.

Would there be any advantage, in PHP, to use the REST interface? The XML-RPC classes available for PHP seem to work well. Thanks.
Old Apr-01-2005, 09:56 AM
#17
Nikolai is offline Nikolai
Darth SLR
Nikolai's Avatar
Just tested with one week old SE
Quote:
Originally Posted by CSwinton
I agree, but the old functionality isn't working "as is"
Works like a charm. no api key, no rest.
Prolly something on your side, my man!

Cheers!
__________________
"May the f/stop be with you!"
Star*Explorer: on Dgrin, home; Master Class: open;
Class is in session, My Facebook, @DarthSLR, #NiksTips
member: NAPP, PPA, partner: Adobe
Comprehending life, universe and everything - one pixel at a time
Old Apr-01-2005, 10:14 AM
#18
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
Quote:
Originally Posted by CSwinton
That was it - I was sending "1.1". Thanks for the quick replies and sorry for any confusion. I didn't think about version control in the API. That's what I get for posting messages on little sleep. Now I know.

Would there be any advantage, in PHP, to use the REST interface? The XML-RPC classes available for PHP seem to work well. Thanks.
Whew. Glad to hear. :)

The interfaces are essentially identical, so which one to use is left up to the author. Both interfaces are easy to use and lightweight (as opposed to SOAP), so you can't really go wrong with either one.

Don
Old Apr-01-2005, 12:42 PM
#19
dds is offline dds
Beginner grinner
No REST
Hi, I just got my API key and I'm trying to give the REST API a shot but so far I've had no luck, just a lot of invalid API key errors

As a quick check that it should be working, in my browser I've been trying to hit this URL:
https://api.smugmug.com/hack/rest/?m...RealAPIKeyHere
with or without SSL, the response is invalid API key. AFACT this should be just like the sample request in the docs. Does it work for anyone else? If so, what browser/OS are you using?

Last edited by dds; Apr-01-2005 at 12:50 PM. Reason: another typo...
Old Apr-01-2005, 01:15 PM
#20
onethumb is offline onethumb OP
SmugMug CEO & Chief Geek
onethumb's Avatar
Quote:
Originally Posted by dds
Hi, I just got my API key and I'm trying to give the REST API a shot but so far I've had no luck, just a lot of invalid API key errors

As a quick check that it should be working, in my browser I've been trying to hit this URL:
https://api.smugmug.com/hack/rest/?m...RealAPIKeyHere
with or without SSL, the response is invalid API key. AFACT this should be just like the sample request in the docs. Does it work for anyone else? If so, what browser/OS are you using?
Give it a shot now.

Don
Page 1  of  3
1 2 3
Tell The World!  

Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump