Skip to content

ODataService DeleteMedia

DeleteMedia action is used to delete a single OData media entity.

The properties defined in Action are also applicable to this action.

ODataService DeleteMedia Properties

Property Type Required
Headers object Optional
RequestOptions RequestOptions Optional
Target LinkQueryTarget Required
_Type const Required

Headers

Custom headers to be included as part of the request to the OData Service in key/value pair format

  • type: object

RequestOptions

Options for processing of data requests


Target

This action can only be executed on a single entity. therefore the Target specifier must be configured to return only 1 entity, otherwise this action will fail


_Type

  • type: const

The value of this property must be equal to:

"Action.Type.ODataService.DeleteMedia"

Action Result

The ActionResult of this action is a JS object containing the deleted media entity.


Examples

Query Options

{
  "_Type": "Action.Type.ODataService.DeleteMedia",
  "Target": {
    "Service": "/MyMDKApp/Services/MyOData.service",
    "EntitySet": "Documents",
    "QueryOptions" : "$filter=DocumentID eq {{Property:#DocumentID}}"
  }
}
{
  "_Type": "Action.Type.ODataService.DeleteMedia",
  "Target": {
    "Service" : "/MyMDKApp/Services/MyOData.service",
    "EntitySet" : "Documents",
    "ReadLink" : "{@odata.readLink}"
  }
}