How can I identify from the code of the API?
Is this API rest or restful?
Which Parameter throw identifies this code as rest or restful?
What is the main difference between rest & restful?
If I use an API code like (Cache memory, Session, or Cookie) so it rest or restful?

Amit MohantyPosted Jan 27, 2023, 11:53 AM
REST is a set of guidelines for building web services, while RESTful is used to describe web services that follow these guidelines. All RESTful web services are REST, but not all REST web services are RESTful.
A RESTful web service is a simple way to expose databases through HTTP following some constraints. Any service that is built on the REST architecture is called a RESTful service. It is typically used to build API for web-based applications.
Anupam MaitiPosted Jan 26, 2023, 5:53 PM
REST is an architectural style that serves as a guideline for designing web services and RESTful refers to a web service that adheres to those guidelines.
An API can be RESTful if it adheres to the following principles of REST:
Client-Server separation: The client and server should be separate entities, with the server responsible for managing the data and the client responsible for displaying it.
Stateless: The server should not retain any information about the client between requests.
Cacheable: Responses from the server should be cacheable to improve performance.
Layered System: The server should be able to work with a layered system, where the client does not need to know the details of the server's implementation.
Use of HTTP methods: The API should use standard HTTP methods (GET, POST, PUT, DELETE, etc.) to indicate the desired action.
Use of URIs: The API should use URIs to identify resources, and the same URI should not be used for different actions.
In summary, REST is a concept and RESTful is a term used to describe a web service that implements the REST concept.
Sachin SinghPosted Jan 26, 2023, 3:18 PM
Correct me, if i am wrong, Rest is just an architectural style, meaning just theory stating some points like i will discuss below, and if a service implement those points then that service is simply Restful.
Like api/Employees/1 is directly indicating that there is a collection of employees on server and i want the first employee or employee with ID=1 on the otherhand api/GetAllEmployees/1 is not following the rest principle because it is not indicating a resource on server getAllEmployee is indicating an action but not a Resource like employees.
And if a service implements all the above rules then that is a Restful Service.
Anoop Kumar SharmaPosted Jan 26, 2023, 2:25 PM
Hi Jayraj.,
An API is considered as RESTful if it meets the below criteria/constraints
1. Client-Server Architecture
2. Stateless
3. Cacheable
4. Uniform Interface
5. Layered System
6. Code-on-demand
You can read about each constraint in detail using the below links:
https://www.redhat.com/en/topics/api/what-is-a-rest-api#rest
https://restfulapi.net/rest-architectural-constraints/