API – Deleting Existing Entities

General

The deletion operation is very straight-forward, and can be done using a DELETE request. The only thing to take into consideration is that the requested entity MUST implement the “delete” method — as an instance method — which should take care of either the logical deletion or removing the record altogether.

The format of a DELETE request is as follows:

DELETE /api/1/odata.svc/[Resource]([id])

An example if we would like to remove a Loan with an ID of 1,

DELETE /api/1/odata.svc/Loans(1)

or

DELETE /api/1/odata.svc/Loans(id=1)


How did we do?


Powered by HelpDocs (opens in a new tab)