6. Real REST Examples

Here's a very partial list of service providers that use a REST API. Note that some of them also support a WSDL (Web Services) API, in addition, so you can pick which to use; but in most cases, when both alternatives are available, REST calls are easier to create, the results are easier to parse and use, and it's also less resource-heavy on your system.
So without further ado, some REST services:

  • The Google Glass API, known as "Mirror API", is a pure REST API. Here is an excellent video talk about this API. (The actual API discussion starts after 16 minutes or so.)
  • Twitter has a REST API (in fact, this was their original API and, so far as I can tell, it's still the main API used by Twitter application developers),
  • Flickr,
  • Amazon.com offer several REST services, e.g., for their S3 storage solution,
  • Atom is a RESTful alternative to RSS,
  • Tesla Model S uses an (undocumented) REST API between the car systems and its Android/iOS apps.

(This is far from an exhaustive list.)


dorai said...

Thank you for excellent posts on REST.

A minor update. The Yahoo Live service has been shutdown since Dec 08. So you may want to update the post to reflect that.

Dr. M. Elkstein said...

Thanks, Dorai. I've now updated the list.

in soham nia said...

Seriously, this is an amazing post on REST, solved all my doubts and more. Epic stuff. Thanks a ton!!!

Hezi said...

REST understood. At last. 10x :-)

candy said...

Thank you so much for putting together this blog explaining what REST is. It's very easy to read and understand, unlike many technical guides out there. I'm just getting started learning how to use web services and this really gives me a huge head start on understanding the concepts!

Anthony said...

Great "paper" indeed! One question on this chapter. If I click on the Yahoo link and look at the page source, I get this (pls see below); isn't this in fact xml/SOAP?


Dr. M. Elkstein said...

Anothony, whatever you posted wasn't displayed by blogger -- I suspect that's because it's all XML tags...

A REST service's response can technically be anything, including an XML/SOAP response, if that's how the authors defined it.

Redwood said...

The posted example needs to be changed - Yahoo has apparently shut down most of their APIs (as of Nov 2010), and the example link just returns a "This service has been shut down" message.

RandallIja said...

Broken links:
Twitter API and Yahoo example.

Dr. M. Elkstein said...

Dear Redwood and RandallIja,

Indeed! It seems like, in these troubled time for the company, Yahoo! no longer makes its various APIs available. I have replaced the detailed example above with a Twitter search, using Twitter's API, and completely removed Yahoo! from the list of examples.

chandan singh said...

Nice article.

Saurav Shrestha said...

Dr Elkstein,

I understand that we can use REST calls by simply constructing a URL and entering it into the browser, but I have a situation here.

What if I need to send some sort of credentials (I'm using a CMS which restricts content by user roles). I don't think I should authenticate with GET since everything is in the URL.

Right now what I'm doing is using a php script to send username/password (the server has a user login end-point) and I print out the http status message and get a 200. How can I use this fact that I just authenticated to get to the protected content? If I try to grab the content AFTER the authentication method runs, I still get a 401, so I'm guessing since REST is stateless, it's not remembering that I am authenticated.

I'm executing the php file in terminal using 'php '.

Thanks in advance. Wonderful resource you have here.


Dr. M. Elkstein said...

Hello Saurav,

Please see the page titled "How do I handle Authentication in REST" for possible answers to your question.

Things I Think said...

On the links you posted ( for example the one labeled "this" that returns JSON) Where are you specifying that REST protocol is used as opposed to SOAP or something? Is this something you specify on the server or what? I'm confused. Thanks!

Dr. M. Elkstein said...

Nothing explicitly marks a REST request/response as such. If you've seen a SOAP request, you'll know the difference immediately...

lykoszine said...

I'm not at all sure about Atom being RESTful RSS though...

manish tiwari said...

Can U pleaase help to imlement RSET in HTML with javascript jquery and ajax

Nitesh Rijhwani said...

This is an excellent and easiest REST tutorial on web...keep up the good work.

Derek said...

Interesting that they call their interfaces 'REST'. Flickr doesn't return URLs to resources, so it fails the HATEOAS test. I wouldn't call that REST. Twitter is interesting, and I'd say it's a true REST, but they only support GET and POST.

Piloto said...

Hi Dr.Elkstein,

When I click on the twitter example, I get this error message:

The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.

Dr. M. Elkstein said...

Hi Piloto,

You're right. It seems like Twitter had shut down their v1.0 API, and the newer API requires authentication, so providing simple links here just won't work.

Sadly, then, I had to remove the Twitter sample links from this page. Thank you for notifying me, though.

The example, BTW, was a vanity search for my name on Twitter. You can still use the website for that :-)

Satyendra Kumar said...

Thanks a lot for this amazing tutorial which helped me out to understand this hazard(REST as earlier) but not it is very soft :)

thanks again

otr214426 said...

Work from home theory is fast gaining popularity because of the freedom and flexibility that comes with it. Since one is not bound by fixed working hours, they can schedule their work at the time when they feel most productive and convenient to them. Women & Men benefit a lot from this concept of work since they can balance their home and work perfectly. People mostly find that in this situation, their productivity is higher and stress levels lower. Those who like isolation and a tranquil work environment also tend to prefer this way of working. Today, with the kind of communication networks available, millions of people worldwide are considering this option.

Women & Men who want to be independent but cannot afford to leave their responsibilities at home aside will benefit a lot from this concept of work. It makes it easier to maintain a healthy balance between home and work. The family doesn't get neglected and you can get your work done too. You can thus effectively juggle home responsibilities with your career. Working from home is definitely a viable option but it also needs a lot of hard work and discipline. You have to make a time schedule for yourself and stick to it. There will be a time frame of course for any job you take up and you have to fulfill that project within that time frame.

There are many things that can be done working from home. A few of them is listed below that will give you a general idea about the benefits of this concept.

This is the most common and highly preferred job that Women & Men like doing. Since in today's competitive world both the parents have to work they need a secure place to leave behind their children who will take care of them and parents can also relax without being worried all the time. In this job you don't require any degree or qualifications. You only have to know how to take care of children. Parents are happy to pay handsome salary and you can also earn a lot without putting too much of an effort.

For those who have a garden or an open space at your disposal and are also interested in gardening can go for this method of earning money. If given proper time and efforts nursery business can flourish very well and you will earn handsomely. But just as all jobs establishing it will be a bit difficult but the end results are outstanding.

Freelance can be in different wings. Either you can be a freelance reporter or a freelance photographer. You can also do designing or be in the advertising field doing project on your own. Being independent and working independently will depend on your field of work and the availability of its worth in the market. If you like doing jewellery designing you can do that at home totally independently. You can also work on freelancing as a marketing executive working from home. Wanna know more, email us on workfromhome.otr214426@gmail.com and we will send you information on how you can actually work as a marketing freelancer.

Internet related work
This is a very vast field and here sky is the limit. All you need is a computer and Internet facility. Whatever field you are into work at home is perfect match in the software field. You can match your time according to your convenience and complete whatever projects you get. To learn more about how to work from home, contact us today on workfromhome.otr214426@gmail.comand our team will get you started on some excellent work from home projects.

Diet food
Since now a days Women & Men are more conscious of the food that they eat hence they prefer to have homemade low cal food and if you can start supplying low cal food to various offices then it will be a very good source of income and not too much of efforts. You can hire a few ladies who will help you out and this can be a good business.

Thus think over this concept and go ahead.