2.2.6.2.1.2 Entity Set (as an Atom Feed Element) with Actions

Applies to the OData 3.0 protocol

In OData 3.0, it is possible to advertise the availability of actions (section 2.2.1.3) that are bound to the definition of the feed, in the feed.

Actions that are advertised by the server MUST be encoded in an m:action element under the atom:feed element that corresponds to the feed that the action is bound to. There can be any number of actions bound to the feed, 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 2.2.1.3.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 2.2.7.5.1) to invoke the action. The binding parameter is assumed to be bound to the encompassing feed definition. Therefore, if the client invokes the action via the target URL, the target URL cannot include a value for the binding parameter in the request body.

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

Actions advertised in the Atom feed element MUST be interpreted as being bound to the definition of the feed and not to the items that are represented in the feed.

Actions that operate on a feed MUST only be advertised in an Atom feed element if the server can fully encode the action, the resource path, and the appropriate system query options that define the feed.

System query options (section 2.2.3.6.1) that change the membership of the feed MUST be considered to be part of the feed definition. In practice, this means that the target URL that is used to invoke the action MUST encode the following system query options if they are used to define the feed:

$filter (section 2.2.3.6.1.4)

$expand (section 2.2.3.6.1.3)

$orderby (section 2.2.3.6.1.6)

$skip (section 2.2.3.6.1.7)

$top (section 2.2.3.6.1.8)

The remaining system query options, generally, do not define the feed and, therefore, do not need to be encoded in the target of the action:

$format (section 2.2.3.6.1.5)

$skiptoken (section 2.2.3.6.1.9)

$inlinecount (section 2.2.3.6.1.10)

$select (section 2.2.3.6.1.11)