Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Robert Mylne
13,708 PointsWhat is SOAP and REST?
What is SOAP and REST? Why do I have to know them? And where can I learn them?
3 Answers

Mer Gilmartin
1,529 PointsSoap and rest are the two most common ways of making an API
Soap http://www.w3.org/TR/soap/ SOAP Version 1.2 is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment.
a rest-ful api http://en.wikipedia.org/wiki/Representational_state_transfer
Representational State Transfer (REST) has gained widespread acceptance across the Web as a simpler alternative to SOAP
Soap is an XML-based protocol. Rest usally uses json http://json.org
Basically most web api's you will create or use will be one or the other.

Robert Mylne
13,708 PointsHey Mer, thanks for the great response. So is an Api basically just a way to pull data of another website to display on your own?

Mer Gilmartin
1,529 PointsAn Api can be used like that alright. An Api is basically a way to let computers use your website rather than a user.
If your website added numbers together, the api call would like numbers be sent to you and then another api call would send the numbers back.
But taking data from a website is a common use for an API. For example tumblr lets you use their Api to get a users dashboard. And Twitter lets you use their Api in order to get a users tweets.
Most apis have a security component where they check if you have permission to access the users data and then a series of different calls that each do a single task.
If you do decide to learn about Apis. You probably also will need to learn about OAuth.
For learning to use an API, learning twitter would be a good way. But I would find a API in the language I know (ex ruby) and also the recommend OAuth library that API uses. That way most of the work is done for me. I just would need to learn to use the code, not write my own.

Mohammed Najeeb Wandawi
1,709 PointsSo is an Api basically just a way to pull data of another website (lets call it an end-point) to display on your own.
yep but its mainly used to pull data for a system not a user
- A user should see HTML message (makes sense for humans)
- A system should see SOAP message (makes sense for systems)
and both use the same protocols to transfer this messages over the WWW.
Robert Mylne
13,708 PointsRobert Mylne
13,708 PointsHey Mer, thanks for the great response. So is an Api basically just a way to pull data of another website to display on your own?