-
Hello,
I would like to create a Host Address through the API that includes DHCP allocation.
I only have been able to create Host Adresseses marked as static. I have no issues setting the assignment I choose in the web interface.
The attribute "ipv4_assignment" only accepts the values in the dialog "IP: Assignment" () but regardless of the value I send, the Host Address is always static.This is one of my attempts to https://demo.i-doit.com
{ "version": "2.0", "method": "cmdb.category.save", "params": { "object": 1412, "category": "C__CATG__IP", "data": { "net": 20, "ipv4_assignment": "DHCP" }, "apikey": "c1ia5q", "language": "en" }, "id": 1 } -
Hello @fa__,
you can set the dialog field "ipv4_assignment" via API but you need to add the net_type, too.
Like :{ "jsonrpc": "2.0", "method": "cmdb.category.save", "params": { "object": 1122546692, "category": "C__CATG__IP", "data": { "net_type": "IPv4 (Internet Protocol v4)", "net": 20, "ipv4_assignment": "DHCP" } }, "apikey": "apikey", "language": "en", "id": 1 } -
Thanks @michael-overkamp!
It works fine.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login