18.104.22.168.2.2 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 22.214.171.124) 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 126.96.36.199.1) 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 188.8.131.52.1) 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 184.108.40.206.1.11) combinations.
If the Atom Entry Element is retrieved as part of a feed (section 220.127.116.11.1) and it is expensive to identify whether an action requested, either implicitly or explicitly, by using Select system query option (section 18.104.22.168.1.11) 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.