Config - Host Group

Object type: hostgroup

Request URL: /rest/config/hostgroup

Example GET Copied

    {
       "object" : {
          "hosts" : [],
          "parent" : {
                "name" : "Opsview",
                "matpath" : "Opsview,",
                "ref" : "/rest/config/hostgroup/1"
             },
          "name" : "Production",
          "id" : "2",
          "children" : [
             {
                "name" : "London",
                "ref": "/rest/config/hostgroup/7"
             },
             {
                "name" : "Paris",
                "ref": "/rest/config/hostgroup/3"
             },
             {
                "name" : "New York",
                "ref": "/rest/config/hostgroup/6"
             }
          ],
          "uncommitted" : "0",
          "matpath" : "Opsview,Production,",
          "is_leaf" : 0
       }
    }

The matpath is a comma separated list of host groups that define this hostgroup’s location in the topology.

The parent contains a the “matpath” attribute to uniquely identify the parent for a host group as it is possible to have duplicated names in the host group hierarchy (from Opsview 3.11.2+).

If you GET with a parameter of order=dependency, the host groups will be listed based on a traversal of the hierarchy, so the top host group will be first and then it will go down a branch until it comes back up again (from Opsview 3.11.2+).

Take note of the following considerations:

["Opsview On-premises"] ["API", "Technical Reference"]

Was this topic helpful?