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.
The default URL format for the endpoint is:
http://localhost or MachineName:port/eml
Consider, a REST service for a record. The data might be organized into a repository, which contain records, attributes, and relationships. The complete URL for the rest service is as follows:
http://localhost:port/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.
Copyright © Cloud Software Group, Inc. All rights reserved.