Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-977

Allow POST with $apply to invoke an action to an aggregated result

    Details

    • Type: Improvement
    • Status: Deferred
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: V4.0_CS02
    • Fix Version/s: None
    • Component/s: Data Aggregation
    • Labels:
    • Environment:

      Proposed

    • Proposal:
      Hide

      Add to chapter 3:

      Service-defined bound actions that take an entity set as their binding parameter MAY be used as the last set transformation within $apply if the type of the binding parameter matches the type of the result set of the preceding transformation. In this case the request MUST be a POST request.

      Example:
      Discount all products that meet a filter condition

      POST Products?$apply=filter(ShelfLife gt duration'P90D')/Special.Discount(Percent=15)

      Show
      Add to chapter 3: Service-defined bound actions that take an entity set as their binding parameter MAY be used as the last set transformation within $apply if the type of the binding parameter matches the type of the result set of the preceding transformation. In this case the request MUST be a POST request. Example: Discount all products that meet a filter condition POST Products?$apply=filter(ShelfLife gt duration'P90D')/Special.Discount(Percent=15)

      Description

      Currently it is not possible to aggregate data and then directly apply an action to the aggregation result.

      An interesting special case is to filter an entity set and then apply an action to the set of entities that passes the filter, e.g. discount all products that have been on the shelf for more than three months.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              handl Ralf Handl
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: