Difference between revisions of "REST API"

From Coder Merlin
m
(Sample text)
Line 6: Line 6:


== The RESTful Criteria ==
== The RESTful Criteria ==
REST stands for REpresentational State Transfer, and is a set of constraints that an API should comply with. These constraints are that the RESTful API must:


== Essential Principals ==
== Essential Principals ==


== Benefits of REST ==
== Benefits of REST ==
REST is preferred over other methods because it:


== Types of Requests ==
== Types of Requests ==
The HTTP protocol defines certain functions to interact with a resource. These functions are not specific to REST APIs, yet are integral in the process of creating and using a REST API. These requests are typically sent from a client to a web server or API. Four of the most common requests are outlined below.


== Possible Data Formats ==
== Possible Data Formats ==
REST APIs can use a variety of data types to fulfill their purpose, some of which include but are not limited to:
* .json (JavaScript Object Notation)
* .xml (Extensible Markup Language)
* .html (Hypertext Markup Language)
* .xlt (Same as .xml)
* .php (Hypertext Preprocessor)
* .py (Python)
They may also use plain text, but out of all these options .jsos is the most popular choice because it’s easily readable by both humans and computers, but is also language-agnostic.


== References ==
== References ==

Revision as of 10:36, 20 August 2021

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Intro[edit]

A REST, or RESTful API is an architectural style used for API (Application Programming Interface). In a REST API, a client sends a request to the server, and the server responds with a representation (such as a JSON file), of the current state of the resource requested by the client that is stored on the server.

What is an API[edit]

An API on websites is made of code that enables two different applications to communicate with each other. They allow developers to access something from one application, even if they may be using a separate application. In summary, APIs are a form of communication between two applications, allowing their functionality to be used somewhere else.

The RESTful Criteria[edit]

REST stands for REpresentational State Transfer, and is a set of constraints that an API should comply with. These constraints are that the RESTful API must:

Essential Principals[edit]

Benefits of REST[edit]

REST is preferred over other methods because it:

Types of Requests[edit]

The HTTP protocol defines certain functions to interact with a resource. These functions are not specific to REST APIs, yet are integral in the process of creating and using a REST API. These requests are typically sent from a client to a web server or API. Four of the most common requests are outlined below.

Possible Data Formats[edit]

REST APIs can use a variety of data types to fulfill their purpose, some of which include but are not limited to:

  • .json (JavaScript Object Notation)
  • .xml (Extensible Markup Language)
  • .html (Hypertext Markup Language)
  • .xlt (Same as .xml)
  • .php (Hypertext Preprocessor)
  • .py (Python)

They may also use plain text, but out of all these options .jsos is the most popular choice because it’s easily readable by both humans and computers, but is also language-agnostic.

References[edit]

By: Mark, Aidan, and Reese