Entity Type (as an Atom Entry Element) with Actions

Applies to the OData 3.0 protocol

In the OData 3.0 protocol, it is possible to advertise the availability of actions (section that are bindable to an entity.

For the server to advertise actions that can be bound to the current entity, the current entity MUST be encoded in a m:action element under the atom:entry element that corresponds to the entity that the action is bound to. Any number of actions can be bound to the entity, and therefore, there can be an arbitrary number of m:action elements.

The m:action element MUST have a metadata attribute that contains the action metadata URL (section of the action.

The m:action element MUST have a target attribute containing a URL. This is the URL to which clients issue an Invoke Action request (section to invoke the action. The binding parameter is assumed to be bound to the encompassing EntityType, and therefore, if the client invokes the action via the target URL, it MUST not include a value for the binding parameter in the request body.

The m:action element MUST have a title attribute containing a simple string used as a simple but not necessarily unique name for the action. Generally, servers SHOULD specify a title that is easily understood by the user because the title is likely to be used by clients to display options to an end user.

Actions can also be selectively requested or omitted by using different Select system query option (section combinations.

If the Atom Entry Element is retrieved as part of a feed (section and it is expensive to identify whether an action requested, either implicitly or explicitly, by using Select system query option (section can be bound to a particular entity, a server SHOULD advertise the action and fail later if the action is invoked and found to be unavailable.