Definition of RESTful API
RESTful API is a combination of two abbreviations. The important one is API which is short Application Programming Interface and is an architecture that allows data to be exchanged between applications. RESTful describes the standardized principle through which this exchange occurs, similar to how USB is a standardized way to connect peripherals to a computer.
What makes an API RESTful?
Based on the REST principles, APIs should be designed as web-based services adhering to a range of design practices and naming conventions.
GET vs. PUT vs. POST
RESTful APIs are mainly called through three different functions, called GET, PUT or POST requests.
- GET calls are telling the server to return a certain range of data, formatted as JSON. These returns are read-only, so they're used to obtain information. An example would be: Send me a list of the 25 most recent tickets.
- PUT requests are used to update existing entities in the source. So for example you could tell the server to "update user Id 47897 telephone number to (555) 478-9774"
- Lastly a POST request is used to create a new child resources underneath an already existing resource. An example would be: Create a record for a new customer called 'Windmill Inc.' with their location at 100 Federal Ave.