I am developing a REST API using Zend Framework 1.12.3. It would be useful to have a parameter in order to be able to return additional information for the return (other collections / resources or parent / child resources).
eg. http://api.example.com/project/:id?include=Company,Company.users
where Company, Company.users represent the company to which the project is assigned, and the users of this company, and therefore these two collections are included in an answer that would not otherwise have been included.
I read briefly about this (Restricting the fields returned by the API here http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#limiting-fields ), but I would like to know more.
Are there any best practice recommendations regarding this issue? Do you have any example governing this?
Have you ever encountered a similar problem (including fields, filter fields, etc.) and how did you solve it?
source share