mike-marcacci / gandhi

The open source, online grant management system.
GNU Affero General Public License v3.0
36 stars 16 forks source link

Add `include` param to all endpoints with embedded collections #87

Open mike-marcacci opened 9 years ago

mike-marcacci commented 9 years ago

Adding the parameter ?include=['embedded_collection_key'] to any API query should return the entire embedded collection inside all returned root level objects.

For example: /cycles/79f9e8b6-4e79-400c-8a52-9c79e26c0380?include=['stages'] would include all visible stages inside the returned object.

Likewise, /cycles?include=['stages'] would return all cycles with embedded stages.