Deleting model objects using the REST API

You can use the REST API to delete a model object using either of two methods.

Only a single object can be deleted in a single request. If the specified object does not exist, no error is returned.

To delete a model object, complete one of the following two methods:

  • To delete an object by specifying its GUID, use the corresponding model object resource, specifying the GUID of the object to delete as part of the URL and using the HTTP DELETE method.
    If you use this method, no data is required in the body of the HTTP request.
    This example, submitted using the HTTP DELETE method, deletes an object using the model object resource:
    http://example.com:9430/rest/model/ModelObject/1D646C44FDEB3857B40B98BD
    F9C0F407?mssGuid=CF5EBF574E7F382289B3F35FB5776628
  • Use the model object update service with the delete parameter and the HTTP POST method, specifying the object to delete in the body of the HTTP request.
    Only the GUID of the object to delete is required in the input data, although the entire object can be specified.
    This example, submitted using the HTTP POST method, deletes the object specified in the body of the request:
    http://example.com:9430/rest/model/ModelObject?delete=true