Resource

In any RESTful service, structure your resources by their hierarchy. These resources are specified in the hierarchical part of the URL. All hierarchical parts are required and unique. None of them can be omitted, and all of them can appear only once. Certain parts of the URL are fixed (such as, the server name, port, and endpoint), and certain parts are parametrized. The parametrized parts are often denoted in code and documentation by curly braces.

Consider, a web service for a record. The data might be organized into a repository, which contain records, attributes, and relationships. The resource URL for the web service is as follows: http://localhost:9393/eml/rest/records/{repositoryName}/{id}

Sending a POST request to this URL might add a new record in a repository, while sending a GET request to this URL might retrieve the details of a particular record ID.