A Brief Introduction to REST APIs

A Brief Introduction to REST API’s

It’s time to talk about REST APIs. In my previous post, we spoke about Multicolour and focused on what our wonderful API generator can do for you. This time I thought it might be nice to delve a little more into REST API’s to show you what you could potentially be missing out on.

I’ve split this post into three sections;

  • What is a REST API?
  • What are REST API’s for?
  • Who’s using them?

If I’m doing my job right, by the time we’re done you will all see the benefits of RESTful APIs and how their application can streamline and potentially boost your business. There are some big fish out there already making use of REST APIs and reaping the benefits of them even as you’re reading this blog post.

What are REST APIs?

So, what is a REST API?

A REST API is an application programme interface (API) that uses HTTP requests to GET, PUT, PATCH, POST and DELETE data. A RESTful API—also referred to as a RESTful web service—is based on representational state transfer, an architectural style and approach to communications often used in web services development.

according to http://searchcloudstorage.techtarget.com

Straight-forward right? This definition lays out for you what REST API’s are as a bare bones concept, but let’s explore things in a little bit more detail.

A Rest API makes use of a specific set of verbs;

  • GET (This will retrieve a resource.)
  • PUT (Updates or creates a resource.)
  • PATCH (Updates a resource)
  • POST (Create a resource)
  • DELETE (Pretty sure I don’t need to explain this one!)

There is a presumption, when using these verbs, that all calls are stateless. What is meant by this is that nothing can be saved by the REST service between executions. This lack of retention however is not necessarily a bad thing. In fact, it can be very useful when it comes to building web services.

Stateless applications can scale more easily to fit load changes and can be redeployed if something goes wrong. The fact that nothing is remembered by the process makes REST APIs perfect for web usage. This is because it’s much faster and more flexible.

That’s the key really and the reason that REST APIs are taking over from traditional procedural design for web based development. They are faster and the flexibility of the stateless approach is infinitely useful when using web based processes.

What are they for?

Ok what is a REST API for though? Why use it? Well, we’ve covered that a bit in the section above. There are many benefits to using REST APIs for web-based applications. For example they open up channels for communication between the user and the host so that, in a way, they exponentially expand what is already there and what you already have.

REST APIs are on the rise and, honestly, it’s only a matter of time before they’re an industry standard, replacing the old guard of procedural technologies. The reason for this is that REST APIs use less bandwidth which makes them more suitable for online and mobile use.

They’re perfect for mobile apps and games! An API is merely code that allows multiple programmes to manage and transform data in a centralised place.

Consumers utilise REST the same way we speak to one another. It’s the language of the web. With online resources on the rise, particularly with cloud usage becoming more widespread, APIs are becoming a way to connect a rising number of people to web services.

If you’re building an API, It makes sense to ensure that you utilise the capabilities of REST to allow your users to connect and interact with your online services.

What is great about REST APIs is that they provide the developer with a lot of flexibility and granularity by breaking down any transaction into a series of resources.

The difficulty lies in their complexity. They are difficult to design from the ground up and it can be quite time consuming! (This is where Multicolour really shines.)

As a RESTful API generator, Multicolour is ideally suited to bring you up to speed by creating boilerplate code in a matter of seconds! With Multicolour doing the legwork for you, you’re free to enjoy all of that increased flexibility almost straight away!

image alt text

Who’s using them?

It’s all very well telling you that ‘big’ companies are making use of REST APIs but that just sounds ominous and gives you very little useable information. You may find yourself asking;

  • What type of companies?
  • What industries do REST APIs work best in?
  • Will I be able to make use of REST APIs?

Let’s take a look at who we know is using the humble REST API. Social media websites see a lot of request traffic. The user wants a specific thing at a specific time usually ASAP so it comes as no surprise that websites such as Facebook, Twitter, Tumblr and** **Linkedin are using RESTful APIs to make this happen.

If you think that RESTful APIs can only apply in a social media format though, then think again. Think how many businesses use the cloud functionality.

  • Wordpress and other blog websites
  • Review and opinion websites such as Huffington post and tripadvisor
  • Online forums
  • Localised online resources such as University intranets.

The list goes on. Mobile applications could also make significant use of RESTful APIs and they do!

In fact REST APIs are essentially universal in their application, from social media to gaming to online shopping! The increase in flexibility and speed that a RESTful API can bring any Web based business are far too good to pass up.

Hopefully you now have a better understanding of just what a REST API is, what they are for and also, who out there is using them.

If I have convinced you of the virtues of the REST API then you’ll see why Multicolour is such a big deal. Not only is it a peerless time saving tool for development, it’s so easy to use that even a complete novice can have a usable RESTful API within seconds of loading the programme.

When it works and works well, why use anything else?

Remember If you have any issues using the software, don’t hesitate to contact us directly on Twitter or Slack