SData web service for Delete
This article describes how to delete a resource with the Web API.
To delete a resource, you send a DELETE HTTP request on the following URL:.
http://myserver:myport/api1/x3/erp/MYENDPOINT/MYCLASS('MYKEY')?representation=MYREPR.$edit
myserver:myport
is your server name and port number. For example localhost:8124
if the SAFE X3 web server is installed locally.MYENDPOINT
is the name of your Sage X3 endpoint.MYCLASS
is the name of the class that you want to query. It may be a standard class like BPCUSTOMER
or a custom class that you have implemented (see the class dictionaries documentation).MYKEY
is the value of the primary key of the resource. If the key is composite, the components are separated by a tilde (~
).MYREPR
is the name of the representation that you want to query. It may be a standard representation like BPCUSTOMER
or a custom one (see the representation dictionaries documentation).Note MYREPR
must be a representation for MYCLASS
. Otherwise you will get an error. A future version of the Web API will allow you to pass only MYREPR
but this version (api1) requires both parameters.
If successful, the request will return an HTTP status of 200.
Otherwise it will return an HTTP error status (4xx or 5xx).
As described in the overview, you can test interactively with a tool like Postman.