What is a REST API?

The Asset Panda API is a REST API. This may beg the question, "What in the world is an API?"

We're glad you asked. API is short for Application Programming Interface and is a set of rules that lets programs talk to each other while exposing data and functionality across the Internet in a consistent format.

REST (also known as RESTful API) doesn't mean that we're hanging out in a hammock somewhere close to the beach (we wish) but instead stands for Representational State Transfer, an architectural pattern that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services. When people use the term REST API, they are generally referring to an API accessed using the HTTP protocol at a predefined set of URLs.

These URLs represent various resources; any information or content accessed at that location, which can be returned as JSON, HTML, audio files, or images. Resources often contain one or more methods that can be performed on them over HTTP such as GET, POST, PUT, and DELETE. The action represented by GET and DELETE is clear, but POST and PUT have specific meanings. How they are defined can sometimes be confusing, but the general rule is that POST creates resources, and PUT updates resources.