-
Documentation task
-
Resolution: Fixed
-
Trivial
-
None
-
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" }