View source | Discuss this page | Page history | Printable version   

Projects/Projects:Property Selection In REST Webservices

Property Selection in REST Webservices - Functional Specifications


Currently when an Entity is fetched using the XML Rest Web Service, either all his children are included or none are, if the includeChildren property is set in the URL. All primitive properties are returned. If the Json Rest Web Service is used, then all the non children properties are returned.

This project will enable to fetch just a subset of the properties of the entities by specifying the list of desired properties in the URL. This will have several benefits:

Design Considerations

To specify a list of properties, the _selectedProperties attribute must be included in the URL. This attribute contains the name of the properties separated by commas: http://localhost:8081/openbravo/ws/dal/ADWindow/100?_selectedProperties=id,name,aDTabList,,,aDTabList.aDFieldList,,aDTabList.aDFieldList.description

The response of this request would return a list of windows, with information about its tabs and fields.. Each window register will contain 2 primitive properties (id, and name), a list of its subtabs. For one of these subtabs its id and name will be included, and also a list of the fields belonging to that tab.

The analog request to the Json Rest webservice would be http://localhost:8081/openbravo/org.openbravo.service.json.jsonrest/ADWindow?_selectedProperties=id,name. This request would not return the list of tabs and fields, because the Json Rest Webservice does not return the child entities.

Retrieved from ""

This page has been accessed 1,017 times. This page was last modified on 17 July 2013, at 16:37. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.