10-26-2016 10:03 AM
Hello all I was hoping you could help me with a problem I am trying to solve. We run a wide variety of different operating systems I would like to be able to create host records while setting the bootserver and bootfile on the fly. I am able to set almost every other option leveraging the wapi but continuosly get an error when trying to set bootfile and bootserver. These are not the dhcp options, these are the are fields under object.
I am using powershell for my work but will gladly extrapolate from any functional example someone can provide.
Solved! Go to Solution.
11-07-2016 01:00 AM - edited 11-07-2016 01:00 AM
hopefully the below will help?
POST /wapi/v2.5/record:host HTTP/1.1
11-07-2016 11:24 AM
Thanks, I will give that whirl. It looks very similar to what I have tested before which failed for me.
Also? Is that a complete creation? Would I need to use the post method for updating an exisiting file instead of put?
I will report back with the results including the script I used.
11-09-2016 05:37 AM
11-14-2016 10:04 AM
Would I need to use the post method for updating an exisiting file instead of put?
I had the opportunity to quickly check this
1. created host with address 18.104.22.168 using the script shared previously
2. Update bootfile name using PUT (update existing object using its reference) - details below:
PUT /wapi/v2.5/record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmxvY2FsLnNiZS5ob3N0d2FwaTI3 HTTP/1.1
hope this helps
12-16-2016 01:23 PM
This worked pefectly for me. I am not sure why I was having issues as the format I was using was very similar. I did not have "configure_for_dhcp":true as in the past that seemed to be set automatically when I set a mac address.