- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Create host record and IP reservation
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-22-2018 09:17 AM - edited 04-22-2018 09:17 AM
Hi,
I have the following curl script and its working just fine
curl -k -u user: password -H "Content-Type: application/json" -X POST 'https://192.168.0.1/wapi/v2.2/record:host?_return_fields=ipv4addrs' -d '{"configure_for_dns":true, "name": "host1.test.loc", "ipv4addrs":[{"ipv4addr":"func:nextavailableip:10.10.18.0/24", "configure_for_dhcp": true, "mac":"aa:bb:cc:11:22:28"}]}'
However, I wanted to change "func:nextavailableip" to manually specify the IP for example:
reserve IP 10.10.18.45 from network range 10.10.18.0/24. Can someone please help me how to do that? the script, API call, etc..
Cheers,
Sofia
Solved! Go to Solution.

Re: Create host record and IP reservation
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-23-2018 03:28 AM
Hi Sofia,
You can manually specify the IP as shown below.
curl -k -u user:password -H "Content-Type: application/json" -X POST 'https://192.168.0.1/wapi/v2.2/record:host?_return_fields=ipv4addrs' -d '{"configure_for_dns":true, "name": "host1.test.loc", "ipv4addrs":[{"ipv4addr":"10.10.18.45", "configure_for_dhcp": true, "mac":"aa:bb:cc:11:22:28"}]}'
Hope this works,
Krishna