- CheckMates
- :
- Products
- :
- Quantum
- :
- Management
- :
- Re: API - Host creation
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
API - Host creation
I'm using the API to create hosts for the first time.
add host name MYHOST ip-address 192.28.1.115 comments MY HOST
But how do I use the host-servers option to configure it as a dns-server
Ive tried:
add host name MYHOST ip-address 192.28.1.115 host-servers dns-server comments MY HOST
But this fails. I can't find any good examples anywhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Based on the documentation, dns-server is a boolean value, that means True or False , host-servers dns-server "True" , try it like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply....Tried that 😞 No luck.
Worked it out though....It's
add host host-servers.dns-server "true" name MYHOST ip-address 192.168.1.2 comments "this is my Host"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For reference, this JSON sent via an HTTP POST to /add-host would yield the same result:
{
"name": "MYHOST",
"ip-address": "192.168.1.2",
"comments": "this is my Host",
"host-servers": {
"dns-server": true
}
}
I add this because it's sometimes a little confusing going from the command line to JSON suitable for sending over the network.
