2.2.6.3.3.1 Entity Type (as a Verbose JSON Object) with Actions

Applies to the OData 3.0 protocol

In the OData 3.0 protocol, the actions name/value pair MAY be included. The value is a JSON object that contains name/value pairs of each action that the server looks for to advertise as bindable to the entity.

For each action, the name MUST be the action metadata URL (section 2.2.1.3.1) that identifies the action and the value MUST be an array of JSON objects. Any number of JSON objects is allowed in this array. Each object in this array MUST have at least two name/value pairs: title and target. The order of these name/value pairs is insignificant.

The target name/value pair MUST be included and contain a URL. When a client issues an Invoke Action request (section 2.2.7.5.1), the value is to be used as the URL. The binding parameter is assumed to be bound to the encompassing entity. 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 title name/value pair MUST be included and contain a simple string that is used as a simple but not necessarily unique name for the action. Generally, servers SHOULD specify a value 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 can also be selectively requested or omitted by using different Select system query option (section 2.2.3.6.1.11) combinations.

If the EntityType JSON Object is retrieved as part of a feed (see section 2.2.6.3.2) and it is expensive to identify whether an action that is requested, either implicitly or explicitly, by using Select system query option (section 2.2.3.6.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.