Back To Basics

Foundation Knowledge

Back To Basics

API- Application Programming Interface

It is a communication protocol between client and server intended to simplify the building of software.

REST API

REST (Representational State Transfer) API is a software architectural style that defines a set of constraints to be used for creating web services. REST APIs are designed to take advantage of existing protocols, and HTTP is the most used protocol. RESTful APIs use HTTP requests to POST (create), PUT (update), GET (read), and DELETE (delete) data. The data is transferred in a standard format such as JSON, XML, or YAML. RESTful APIs are stateless, meaning that the server does not need to keep track of the client’s state between requests. This makes them scalable, reliable, and easy to use.

Methods that are commonly used to communicate with the REST API.

  • GET – The get method is used to extract information from the given server using a given URL. While using a GET request, it should only extract data and should have no other data.

  • POST – A post request is used to send data to the server, for example, customer information, file upload etc. Using HTML forms

  • PUT – Put will replace the existing resources which are already present on the server.

  • DELETE – Removes all current representations of the target resource given by the URL.