Project

General

Profile

Actions

User story #7414

closed

Allow user to select level of compliance details in API response

Added by François ARMAND about 9 years ago. Updated almost 9 years ago.

Status:
Released
Priority:
3
Category:
API
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

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.

Actions

Also available in: Atom PDF