RESTful-ness of Amazon Web Services APIs?

565 views
Skip to first unread message

The Curious Techie

unread,
Jan 10, 2012, 6:01:07 AM1/10/12
to API Craft
I saw the video, got a feeling about what's REST and what's not; went
out and examined a few RESTful API's (other than the ones mentioned in
the talk by Brian Mulloy; I also looked at Pachube - https://pachube.com/docs/v2/
and AWS).

While Pachube struck me as an API following almost all the best
practices outlined by Brian and others; AWS left me confused! I have
been thinking of AWS as the pioneers of the cloud; and hence by
extension of RESTful APIs. Looks like I need to revisit that notion?

For one, AWS splits its API's among several services - but probably
that was necessary for their business model (unlike the twitter
example that Brian gave in the talk)?

Then, they make a distinction between pure REST API's and Query APIs.
An example of a Query API for AWS EC2 is found here -
http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-query-api.html
Basically, the idea seems to be that if you use a query parameter
(rather than the HTTP method) to specify the action to perform, it
cannot be considered as REST - hence they call it Query API, even if
it is REST-like in most other aspects. An example of a pure REST API
by amazon (Amazon S3) is here - http://docs.amazonwebservices.com/AmazonS3/latest/API/APIRest.html

But, wait .. there is yet another API which they claim is REST, but is
more Query-like - the Simple DB API here
http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html

So, my confusion is this - keeping with the spirit of being a
pragmatic REST API developer as opposed to a purist; do I really need
to make that distinction between a REST API which uses the HTTP Verb
to convey "what operation to do" and one which uses a query parameter
instead, making all requests as HTTP GETs??

The Curious Techie

unread,
Jan 17, 2012, 9:47:39 PM1/17/12
to api-...@googlegroups.com
No opinions regarding this yet?

Dan

unread,
Jan 20, 2012, 12:08:10 PM1/20/12
to API Craft
Personally I favour sticking as close as possible to the use of HTTP
verbs for actions..... reliance on a parameter that says one of the
CRUD options makes me nervous....

For example :
GET http://api.battersea.org.uk/dogs?name=frodo is very easy to
understand - it looks up dogs called Ford
GET http://api.battersea.org.uk/dogs?name=frodo&type=Labrador&weight=30kg&owner=dan&location=uk&city=winchester
is a more complex lookup.
GET http://api.battersea.org.uk/dogs?name=frodo&type=Labrador&weight=30kg&action=create&owner=dan&location=uk&city=winchester
is far less clear - you could miss the action=create and think it was
a lookup operation, far too easy to miss it is actually going to
create a new dog.


On Jan 18, 2:47 am, The Curious Techie <techie.curi...@gmail.com>
wrote:

Greg Brail

unread,
Jan 20, 2012, 7:57:05 PM1/20/12
to api-...@googlegroups.com
Believe me, I wish that I could retrieve a list of objects from SimpleDB like this, 


and use a standard OAuth 2.0 token,

rather than all the stuff that I have to do for AWS. But the AWS APIs are mostly consistent with each other which at least minimizes the weird stuff that I have to learn every time!


On Tue, Jan 17, 2012 at 6:47 PM, The Curious Techie <techie....@gmail.com> wrote:
No opinions regarding this yet?



--
Gregory Brail  |  Technology  |  Apigee  |  1-650-937-9302

G. Hussain Chinoy

unread,
Mar 7, 2012, 9:17:16 AM3/7/12
to api-...@googlegroups.com
I second that wrt AWS API's. Consistency throughout an API should definitely be a principle or a criteria for evaluation. It'd be great if they followed other established conventions, but at least they're (trying to be) consistent!

H


On Friday, January 20, 2012 5:57:05 PM UTC-7, Greg Brail wrote:
Believe me, I wish that I could retrieve a list of objects from SimpleDB like this, 


and use a standard OAuth 2.0 token,

rather than all the stuff that I have to do for AWS. But the AWS APIs are mostly consistent with each other which at least minimizes the weird stuff that I have to learn every time!

Message has been deleted

Sam Ramji

unread,
May 31, 2018, 2:52:38 PM5/31/18
to API Craft
This is not an appropriate posting to this forum.

1) Not informative - obvious statements that don't relate to the topic
2) Advertising - links to your training company
3) Not original - this appears to be copied and pasted from the AWS documentation (link).

I'm deleting this post, but for now will not ban you as an author. Please try to be helpful and maintain the thoughtful and practical spirit of this forum.

Sam

On Tuesday, May 22, 2018 at 1:26:14 AM UTC-7, ijazz jazz wrote:


Requests to Amazon S3 can be authenticated or anonymous. Authenticated access requires credentials that AWS can use to authenticate your requests. When making REST API calls directly from your code, you create a signature using valid credentials and include the signature in your request. For information about various authentication methods and signature calculations, see Authenticating Requests .


Making REST API calls directly from your code can be cumbersome. It requires you to write the necessary code to calculate a valid signature to authenticate your requests. We recommend the following alternatives instead:


Use the AWS SDKs to send your requests (see Sample Code and Libraries). With this option, you don't need to write code to calculate a signature for request authentication because the SDK clients authenticate your requests by using access keys that you provide. Unless you have a good reason not to, you should always use the AWS SDKs.


Use the AWS CLI to make Amazon S3 API calls. For information about setting up the AWS.



AWS TRAINING IN BANGALORE 

Reply all
Reply to author
Forward
0 new messages