3 Replies Latest reply on Jan 8, 2015 1:07 PM by lmlcoch

    OData: difference between Template-model query and filtered physical model query?

    Roger Palmen

      I have been looking at the documentation of the OData feature in the Web API CTP, did not install or experiment yet.

       

      I do not really understand the difference / benefit of the template model, when i can filter the physical model on template too. Anyone to enlighten me?

      The below two queries from the query compendium should return the same results:

       

      PHYSICAL: Snapshot values of attributes of element created from Boiler template:

      https://<host>/piwebapi/OData/NuGreen/Snapshots?

      $filter=Attribute/Element/Template/Name eq 'Boiler'&

      $expand=Attribute/Element/Template&

      $select=Attribute/Element/Template/Name,Attribute/Element/Name,Attribute/Name,Time,ValueDbl

       

      TEMPLATE: Snapshot of all Boiler attributes:

      https://<host>/piwebapi/OData/NuGreen/T/BoilerSnapshots?

      $select=BoilerName