Project

General

Profile

Actions

Bug #3767

closed

With the API, it is possible to set a Group with no criteria

Added by Nicolas PERRON almost 11 years ago. Updated over 9 years ago.

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

Description

With the API, it is possible to set a Group as having no criteria.

root@rudder-snapshot:~# curl -H "X-API-Token:ACnxAtsckQGGQN40MuGavq6wNHMMpqM5" -H "X-API-Version: 2" -X GET http://localhost/rudder/api/groups/5046d372-3717-4e8d-b417-94c3e1dc8628?prettify=true 
{
  "action":"groupDetails",
  "id":"5046d372-3717-4e8d-b417-94c3e1dc8628",
  "result":"success",
  "data":{
    "groups":[{
      "id":"5046d372-3717-4e8d-b417-94c3e1dc8628",
      "displayName":"Super group",
      "description":"",
      "query":{
        "select":"nodeAndPolicyServer",
        "composition":"And",
        "where":[{
          "objectType":"node",
          "attribute":"OS",
          "comparator":"eq",
          "value":"Linux" 
        }]
      },
      "nodeIds":["root"],
      "isDynamic":true,
      "isEnabled":true
    }]
  }
root@rudder-snapshot:~# curl -H "X-API-Token:ACnxAtsckQGGQN40MuGavq6wNHMMpqM5" -H "X-API-Version: 2" -X POST http://localhost/rudder/api/groups/5046d372-3717-4e8d-b417-94c3e1dc8628?prettify=true 
{
  "action":"updateGroup",
  "id":"5046d372-3717-4e8d-b417-94c3e1dc8628",
  "result":"success",
  "data":{
    "groups":[{
      "id":"5046d372-3717-4e8d-b417-94c3e1dc8628",
      "displayName":"Super group",
      "description":"",
      "nodeIds":["root"],
      "isDynamic":true,
      "isEnabled":true
    }]
  }
Actions

Also available in: Atom PDF