Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-15112

API Docs: Macros usage on host.create

XMLWordPrintable

    • Sprint 46, Nov 2018
    • 0

      In the host.create documentation page there isn't a clear example on adding macros when creating the host.

      Maybe something like this could be useful for demonstrating it:

       

       

      {
       "jsonrpc": "2.0",
       "method": "host.create",
         "params": {
           "host": "example.com",
           "macros": {
             "macro": "{$USER_ID}",
             "value": "123321"
            },
           "interfaces": [
              {
                "type": 1,
                "main": 1,
                "useip": 1,
                "ip": "192.168.1.101",
                "dns": "example.com",
                "port": 10050
              }
            ],
            "groups": [
              {
                "groupid": "2"
              }
            ],
            "templates": [
              {
                "templateid": "10001"
              }
            ],
            "inventory_mode": 0,
            "inventory": {
              "tag": "with_user_id"
             }
         },  
       "auth": "XX"
      }

       

       

            martins-v Martins Valkovskis
            plamer Plamen
            Team D
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: