What a REST API has to do with pizza - Actonic – Unfolding your potential

What a REST API has to do with pizza

REST API


5
(1)

As a consultant, there are numerous situations in which you interact with developers and may encounter terms that you don't particularly understand. To ensure that your projects are successful and you can continue to deliver the best consulting to your clients, we're going to clear things up today: What is a REST API?

5
(1)

What is an API?

API is an abbreviation for API is an abbreviation for Application Programming Interface. In other words: programming interface. The term is clear, but what is behind it? In other words: programming interface. The term is clear, but what lies behind it?

It is best to consider an API to be an intermediary between the end users and the requested resources/web services. Programming interfaces are used for standardized exchange of information between applications and individual program parts, completely independent of their implementation. APIs mediate your requests to the server and tell you what the server’s response was using a language you can understand. They are specifications of possible interactions with software components.

Excursus: HTTP and how does the Internet work?

To understand APIs holistically, it is worthwhile to dig a little further: on the Internet. The Internet consists of many individual networks (servers).

Data is stored in them. In order for this data to reach you and your browser, a special protocol called HTTP is used. This stands for Hypertext Transfer Protocol. HTTP specifies the structure of requests and responses and defines a standard for transferring content.

APIs use HTTP to send a request to the server, after which the server delivers the response.

API simply explained with pizza

You are hungry and decide to go to a restaurant. An attentive waiter comes to your seat and takes your order: “Pizza Margherita.”

“Do you have it vegan?”

Unless you are dining in a vegan restaurant, the answer to this question is quite open. You’re not interested in the details of whether there was vegan cheese substitute yesterday or whether there will be again in two weeks. You are interested in a real-time answer to your acute request.

The waiter communicates with the kitchen staff, comes back and tells you that you will get your vegan pizza. A little later, he serves you your vegan pizza.

This service is in a way what an API does: it delivers exactly what you want, to the extent that the kitchen (the underlying system) can provide it. Moreover, you don’t need to know all the details of the caching exactly, i.e., how the resources are retrieved or from where (in our case: the full circumstances of how the vegan cheese is stocked, produced, etc. Yes or no is enough of an answer).

And the language in which the order is placed, accepted and delivered is HTTP in this case.

Examples of APIs

  • PayPal Payment

    • Certainly, you have already paid your order through a webshop using PayPal. This is also an API that ensures that the end application only does what it needs to do without violating sensitive data.

  • Fast log-in

    • On many websites, you can log in to social media channels with simple buttons. Again, this is where the platforms’ APIs are used to identify you.

  • Book a vacation

    • You want to strike the best vacation deal: Internet comparison portals offer an ideal overview of departure times and prices. APIs allow data and requests to be exchanged quickly and autonomously.

What is a REST API?

A REST API is a special type of programming interface. REST stands for: Representational State Transfer, an architectural style used to exchange data between users and applications. Rest is not a standard, but merely an architectural design, in a sense a collection of different protocols.

REST is also not a protocol like HTTP, but uses the HTTP protocol to retrieve and provide resources. This is also one of the main differences between APIs and REST APIs: depending on the type of API, a different protocol is used. REST APIs interact exclusively through HTTP protocols.

Furthermore, REST architecture is easily modifiable and implementable.

Rest API: Precisely defined

For an API to be a REST API, there are some criteria that must be met:

  • Client/Server architecture

    • The client-server principle follows the idea of “separation of concerns”. By separating different concerns, code maintenance and simplification are improved.

  • Statelessness

    • This means that relevant session data is stored at the client and not the server. Stateless logs increase performance by keeping server load low compared to keeping session information.

  • Cacheability

    • Performance scalability is greatly enhanced by well-managed caching. The cache can be run either on the client machine (memory) or in browser memory.

  • Multi-layer system

    • Intermediate servers do not affect client-server communication, but improve system scalability and security logic.

  • Code-on-demand

    • Servers can extend functionalities of a client by transferring the executable code.

  • Unified interface

    • The unified interface of the REST system greatly simplifies the architecture. Using URIs, the resources are conceptually separated from the representations that the client contains.

REST APIs advantages

  • APIs enable simplified programming

  • Clean overall structure, as individual functions can be outsourced to program modules

  • Agility through automated workflows thanks to APIs

  • Seamless communication through integration of platforms and systems

  • REST APIs are very flexible and can be adapted to any data changes

  • APIs provide additional protection between data and servers

Even if APIs simplify the handling of data security issues, every company should ensure that the (Atlassian) products used comply with data protection guidelines. We would be happy to take a look at your systems and requirements and check whether you are working in compliance with data protection, or which twists and turns we can still work on together.

Jira REST API

The Jira Rest APIs are intended for developers who want to create add-ons for Jira software and develop integrations between Jira and other applications, as well as provide a low-level way to interact with the system.

Jira REST APIs make resources available via URI paths. The currently supported response format is JSON. Methods are the standard HTTTP methods such as GET, PUT, POST and DELETE.

The advantage of Jira REST API is that it is based on open standards. This means that any conceivable development language can be used to access it.

https://developer.atlassian.com/cloud/jira/platform/images/jira-connect-overview-adg3.png

Atlassian provides detailed Jira REST API documentation, so you know exactly how to use the REST API and what to look for. Likewise, you can find great tutorials online in the Jira Server REST APIs sample guide or Jira Cloud REST APIs sample guide for creating or updating tasks or advanced search functions.

Conclusion REST API and Pizza

We hope we were able to clear up some question marks about the (Jira) REST API. Just always remember the pizza example: you as a client want to have a pizza from the staff in the kitchen (server). The negotiation takes place in English (HTTP) and follows certain guidelines, such as politeness. These guidelines, in which the conversation takes place, are what the API does. It makes sure that you, as a customer, get exactly the pizza you want – if the kitchen can deliver.

If you have any further questions, please don’t hesitate to contact us!

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Want to
know more?

Contact us to talk to our experts and have all your questions answered.

Request
free offer