# Representational State Transfer (REST)
**Is a method of communication between web services that models all interactions between them as either retrieving or modifying service state.** To this end, HTTP Methods are used to indicate the kind of operation being performed.
Applications that use REST are often referred to as RESTful applications, or it is said that they have a REST API.
## Hypermedia as the Engine of Application State
Hypermedia as the engine of application state is guidance for how REST API-s should be designed. It basically states that **a REST client should need little to no prior knowledge in order to interact with a server. This is in contrast to the Common Object Request Broker Architecture, which provides for a fixed communication interface.**
**Clients should only know the service's root, and all resources provided by the service are listed in the initial response as Hypermedia links.**
## Benefits
- No framework or tools needed (a browser is enough for testing)
## Drawbacks
- In spite of the hypermedia as the engine of application state guidelines, can be more complicated to use due to the use of HTTP. Users have to keep track of headers, query parameters, methods, cookies, etc.
- Design is incompatible with the idea of [[Published Interface]], making the choice of REST in a [[Microservice Architecture]] questionable.
## Versioning REST APIs
Versioning REST APIs can be classified using Push-Pull Classification.
In push versioning, the server dictates supported version through a different root endpoint (/api/v1). Version is very visible this way, however any other servers that provide other resources that link to the old endpoint have to change as well (to provide new links).
In pull versioning, the client informs the server which versions it will accept through an HTTP Header. This method does not suffer from the issue above, but is more difficult to test through a browser. It will also potentially cause issues with caching, if any network components return stale cached content instead of forwarding the request.