Config - Hashtag/Keyword

Object type: keyword

Note

Even though they are called hashtags in the UI and documentation, they are still referenced as keywords in the REST API.

Request URL: /rest/config/keyword

Permissions: Requires CONFIGUREKEYWORDS

Methods:

Example GET Copied

    {
       "object" : {
          "all_hosts" : "0",
          "all_servicechecks" : "0",
          "calculate_hard_states" : "0",
          "description" : "cisco devices",
          "enabled" : "1",
          "exclude_handled" : "0",
          "hosts" : [
             {
                "ref" : "/rest/config/host/7",
                "name" : "cisco"
             },
             {
                "ref" : "/rest/config/host/8",
                "name" : "cisco1"
             }
          ],
          "id" : "2",
          "individual_objects" : [
             {
                "attribute_value" : null,
                "host_id" : "7",
                "host_name" : "cisco",
                "id" : "13",
                "servicecheck_id" : "44",
                "servicecheck_name" : "Check Memory"
             },
             {
                "attribute_value" : null,
                "host_id" : "8",
                "host_name" : "cisco1",
                "id" : "16",
                "servicecheck_id" : "79",
                "servicecheck_name" : "Coldstart"
             },
             {
                "attribute_value" : null,
                "host_id" : "11",
                "host_name" : "cisco4",
                "id" : "17",
                "servicecheck_id" : "44",
                "servicecheck_name" : "Check Memory"
             },
             {
                "attribute_value" : "Ethernet0-12",
                "host_id" : "11",
                "host_name" : "cisco4",
                "id" : "22",
                "servicecheck_id" : "95",
                "servicecheck_name" : "Interface"
             }
          ],
          "name" : "cisco",
          "public" : "1",
          "roles" : [
             {
                "ref" : "/rest/config/role/14",
                "name" : "View some, change none"
             },
             {
                "ref" : "/rest/config/role/15",
                "name" : "View some, change none, no notify"
             }
          ],
          "servicechecks" : [
             {
                "ref" : "/rest/config/servicecheck/82",
                "name" : "Another exception"
             },
             {
                "ref" : "/rest/config/servicecheck/81",
                "name" : "Test exceptions"
             }
          ],
          "show_contextual_menus" : "0",
          "style" : "group_by_host",
          "uncommitted" : "1"
       }
    }

Fields:

Example POST/PUT Copied

    {
       "all_hosts" : "0",
       "all_servicechecks" : "0",
       "calculate_hard_states" : "0",
       "description" : "cisco devices",
       "enabled" : "1",
       "exclude_handled" : "0",
       "hosts" : [ 7, 8 ],
       "id" : "2",
       "individual_objects" : [
          {
             "attribute_value" : null,
             "host_name" : "cisco",
             "id" : "13",
             "servicecheck_name" : "Check Memory"
          },
          {
             "attribute_value" : "/",
             "host_name" : "opsview",
             "id" : "0",
             "servicecheck_name" : "Disk"
          },
          {
             "attribute_value" : "Ethernet0-12",
             "host_name" : "cisco4",
             "id" : "22",
             "servicecheck_name" : "Interface"
          }
       ],
       "name" : "cisco",
       "public" : "1",
       "roles" : [ 14, 15 ],
       "servicechecks" : [ 82, 81 ],
       "show_contextual_menus" : "0",
       "style" : "group_by_host",
       "uncommitted" : "1"
    }

individual_objects Copied

The input for this field is expected to be an array of objects. The logic for creating is:

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

Was this topic helpful?