User story #7414
closedAllow user to select level of compliance details in API response
Description
For now, the compliance API is quite verbose in its details, and most of the time, one just want a synthetic view of compliance, especially when looking for all rules/nodes.
Of course, this can be achieved with a post processor like jq, but not everybody want to write jq scripts, and it's quite unoptimized regarding network load.
So we need to be able to specify a query parameter which tell the server how many level deep the user want details on.
Example:
curl -k -H "X-API-Token: XXXX" 'http://localhost:8082/rudder-web/api/latest/compliance/nodes?level=3'
Where level=1 (or less) mean "only top elements (nodes or rules), 2 means "also their sub-elements", etc until the most detailed level. Any number superior to the total number of level also lead to returning all levels.
Also, the compliance mode should be present at the top level.
Updated by François ARMAND about 9 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/964
Updated by François ARMAND about 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder|6a7583b40a748984a7fa896ef6db24f7c23d37fb.
Updated by Vincent MEMBRÉ about 9 years ago
Applied in changeset rudder|3c43f3f23b051ef65d66f6a4c6c20fd846331c00.
Updated by Vincent MEMBRÉ about 9 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.2.0~beta1 which was released today.