Project

General

Profile

Actions

Bug #7900

closed

API documentation for compliance needs JSON prettified

Added by Jonathan CLARKE about 8 years ago. Updated almost 8 years ago.

Status:
Released
Priority:
N/A
Category:
Documentation
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

The JSON examples in http://www.rudder-project.org/rudder-api-doc/#api-Nodes-acceptedNodeDetails are very hard to read for a human, and don't match the format used in the rest of the documentation. They make it pretty much impossible to figure out the data structure to expect:

Rest of documentation:

      {
        "action":"createRule",
        "id":"73fb7802-5326-483a-a6d6-c29e78449558",
        "result":"success",
        "data":{
          "rules":[{
            "id":"73fb7802-5326-483a-a6d6-c29e78449558",
            "displayName":"Cloned Rule",
            "shortDescription":"",
            "longDescription":"",
            "directives":["c4f58823-5cd6-455b-b0bc-1511c51e2533"],
            "targets":["group:1e975cb2-b929-46f5-9b1c-5e4d5d5f1027"],
            "enabled":false,
            "system":false
          }]
        }
      }

Compliance API documentation:

      {
        "data": {
          "nodes": [
            {
              "rules": [
                {
                  "directives": [
                    {
                      "components": [
                        {
                          "values": [
                            {
                              "reports": [
                                {
                                  "status": "noReport" 
                                }
                              ],
                              "value": "None" 
                            }
                          ],
                          "complianceDetails": {
                            "noReport": 100
                          },
                          "compliance": 0,
                          "name": "ZMD process" 
                        },

Actions

Also available in: Atom PDF