Project

General

Profile

Bug #6309

Updated by François ARMAND over 9 years ago

The api documentation for group is not correct: it says that the parameter name is "nodeGroupCategoryId", but it is in fact "category": http://www.rudder-project.org/rudder-api-doc/#api-Groups-createGroup 

 This is even more embarassing since the "GET" for When creating a group give via the documented API, at least with JSON parameters, not all parameters for category, and other for dynamic/enabled: are taken into account. For example, that JSON file: 

       { 
         "isEnabled": true, 
         "isDynamic": false, 
         "nodeGroupCategoryId": "15f7e64d-1988-41b4-af3d-4106b204ead7", 
 ... 
         "query": { 
           "where": [ 
             { 
               "value": "Debian", 
               "comparator": "eq", 
               "attribute": "osName", 
               "objectType": "node" 
             }, 
             { 
               "value": "root", 
               "comparator": "eq", 
               "attribute": "nodeId", 
               "objectType": "node" 
             } 
           ], 
           "composition": "Or", 
           "select": "nodeAndPolicyServer" 
         }, 
         "description": "", 
         "displayName": "api test", 
       } 
 

 Where the category id exists, leads to that group: 

       { 
         "isEnabled": true, 
         "isDynamic": true, 
         "nodeIds": [ 
           "729be5c4-55a2-4b97-8529-5154cbb63a18", 
           "root" 
         ], 
         "query": { 
           "where": [ 
             { 
               "value": "Debian", 
               "comparator": "eq", 
               "attribute": "osName", 
               "objectType": "node" 
             }, 
             { 
               "value": "root", 
               "comparator": "eq", 
               "attribute": "nodeId", 
               "objectType": "node" 
             } 
           ], 
           "composition": "Or", 
           "select": "nodeAndPolicyServer" 
         }, 
         "description": "", 
         "displayName": "api test", 
         "id": "1ca18475-ee4b-46db-968e-87af2d01008b" 
       } 

 And that group is NOT in the category and does not have the correct "isDynamic" value.

Back