What is Resource in REST?

REST architecture treats any content as resource, which can be text files, HTML pages, images, videos or dynamic business information. REST server gives the functionality to access the resources and modifies them. We can identify the each resources by URIs/ global IDs.

In the context of REST (Representational State Transfer), a resource refers to any data or service that can be identified by a unique URI (Uniform Resource Identifier). Resources are the key abstraction in RESTful architectures, and they can represent entities such as objects, services, or concepts.

A resource in REST typically has a state that can be manipulated or retrieved using standard HTTP methods, such as GET, POST, PUT, or DELETE. The representation of a resource, often in the form of JSON or XML, is transferred between the client and server to perform operations on that resource.

For API testing, understanding and manipulating resources are essential tasks. Testing involves making requests to these resources using the appropriate HTTP methods and validating the responses. The URI, HTTP method, request headers, and request/response body all play a crucial role in testing and interacting with RESTful resources.