Creating a Restful API Part 1

Creating a Restful API Part 1

Today I am experimenting with creating my own API for people to be able to tie into. This series of articles will go over creating a REST API. This first article will be an Overview on what the RESTful API actually is.

So first, what is a REST API?

Well REST stands for representational state transfer. As REST applies to a Web API, it is essentially a standard connection of HTTP to send/receive resources.

You connect to a given URL such as: http://www.siosphere.com/api/leads and you pass in parameters, to retrieve leads, add leads, delete leads, etc.

The implementation we are going to be working with, is an Update API, to retrieve updates from a global site.

How does this all work:

Rest API Overview

In the above graphic it is simplified. You have external servers wanting to get data from the global server. They connect to the RESTful api and pass in their authentication, be it a username / password or API key. Once it is authenticated, based on the URL it goes to a resource. The resource we are working with is Updates.

Once you are in that resource, you have access to all the methods defined under that resource, in the graphic above, the available methods are Get, Add, Delete. Eventually you could have Edit, and other such functions.

Comments
comments powered by Disqus