v2

latestOpenAPI 3.1.0CC-BY-SA 2.02026-07-2617789528.6 KB
Groups

Create a group

Create a new group based in provided parameters

put/groups

Request body

sourcestring uuid

The id of the group the clone will be based onto. If this parameter if provided, the new group will be a clone of this source. Other value will override values from the source.

categorystring uuid required

Id of the new group's category

idstring uuid

Group id, only provide it when needed.

displayNamestring required

Name of the group

descriptionstring

Group description

dynamicboolean

Should the group be dynamically refreshed (if not, it is a static group)

enabledboolean

Enable or disable the group

Example request

{
  "source": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
  "category": "e17ecf6a-a9f2-44de-a97c-116d24d30ff4",
  "id": "32d013f7-b6d8-46c8-99d3-016307fa66c0",
  "displayName": "Ubuntu 18.04 nodes",
  "description": "Documentation for the group",
  "query": {
    "composition": "and",
    "where": [
      {
        "objectType": "node",
        "attribute": "OS",
        "comparator": "eq",
        "value": "Linux"
      }
    ]
  },
  "properties": [
    {
      "name": "os",
      "value": "debian10"
    }
  ]
}

Response

Group information

result'success' | 'error' required

Result of the request

action'createGroup' required

The id of the action

Example response

{
  "data": {
    "groups": [
      {
        "id": "32d013f7-b6d8-46c8-99d3-016307fa66c0",
        "displayName": "Ubuntu 18.04 nodes",
        "description": "Documentation for the group",
        "query": {
          "composition": "and",
          "where": [
            {
              "objectType": "node",
              "attribute": "OS",
              "comparator": "eq",
              "value": "Linux"
            }
          ]
        },
        "nodeIds": [
          "109142a2-40eb-4e6d-84b4-7ebe3670474c"
        ],
        "groupClass": [
          "group_ubuntu"
        ],
        "properties": [
          {
            "name": "os",
            "value": "debian10"
          }
        ]
      }
    ]
  }
}