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 #1

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
Actions #2

Updated by François ARMAND about 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #4

Updated by Vincent MEMBRÉ almost 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.

Actions

Also available in: Atom PDF