The standard HTTP methods are used for performing create, retrieve, update, and delete operations on resources. The mapping of the HTTP methods to operational semantics is described in the following table:
HTTP method | Description | Example |
---|---|---|
GET |
Used to retrieve the resource representation. This method does not modify the resource across repeated invocations. The query parameters are appended to the URI to appropriately filter the resource instances. | GET <BASE_URI>/ ApplicationService/AuditLogs?$filter=CreatedDate gt '2016-11-15 16:35:39.820' To retrieve only logs with dates after'2016-11-15 16:35:39.820' . |
POST |
Used to create a new instance of a resource or append to the existing resource reference. | POST <BASE_URI>/SessionService/Sessions Creates a new user session (Payload is not shown.) |
PUT |
Used to update a specific instance or create a specific resource instance with a specific identifier. | PUT <BASE_URI>/AccountService/Accounts('1414') Updates the user account details (Payload is not shown). |
DELETE |
Used to remove a specific resource. If the resource does not exist, success is returned. | DELETE <BASE_URI>/AccountService/Accounts(‘1414’) Deletes a specific user account with an instance identifier (‘1234’). |