Closed netman2048 closed 7 years ago
I would also like to see this feature implemented sooner rather than later. I'm considering changing the IPAM we use in preparation for network automation and this is kind of a crucial element.
Writable api would be awesome, specially when using with packer/ansible/jenkins
@jeremystretch is there any ongoing work on this ? is this something that you would like contributions as we would also want to implement IPAM with writeable APIs.
I've been working on a extending out the api to support full write operations on a private branch.
Generally speaking ive been following the url scheme of:
post to /module/resource/add/ put/patch to /module/resource/pk/edit/ delete to /module/resource/pk/delete/
If this fits and is desired I can work on a pull request to merge it back upstream. One thing I havent figured out how to do yet is handle custom fields, so ignoring that for now in favor of making progress.
I am really looking forward to full POST/PUT support too.
@Zanthras nice!, although I really need custom fields as well so hoping it wont be forgotten.
We have a use case where netbox should hold the own IP prefixes but a external IPAM Client is asking for registering a new IP or Prefix in netbox. is this covered by writable API?
writable API is important to integrate it with configuration management tools.
Would the jsonapi format be suitable for our needs?
I contributed to "djangorestframework-jsonapi" and would be available to contribute into netbox as well if the future functionality is in line with that format.
Let me know if you welcome contributions on that topic.
I'd be interested in the updating of fields of a device using the put/patch methods through the API. One field I would like to update in particular is the "Status" field which I want to use as a tie in to the success/failure of a connection to the device's primary IP. I'm all ready but just found that the PUT/PATCH wasn't supported...
@jsenecal For me jsonapi would be perfect.
Good news! I've started work on API v2.0 and it's going very well. I can't provide an ETA for the beta just yet, but you can keep an eye on the progress by watching the api2 branch.
This is by far the most-requested feature for NetBox, and I realize everyone is eager to try it out. However, I want to make sure we're investing a prudent amount of thought and effort into the new API up front so that we can avoid too many changes down the road.
I would like to see this follow the CRUD principle. An example of this can be seen here:
http://www.restapitutorial.com/lessons/httpmethods.html
Basically, you don't have to say, for example, "/something/create", the fact that you are POSTing is an indication that you want to create.
A working example of this can be seen in the Foreman API.
@jbnance Yep, that's the plan. Each object type will generally have two URL endpoints.
@jeremystretch are you looking for any contributors for this feature ? This would be really helpful for us and there is a possibility to get some engineering time allocated if so.
Is the branch in any state to be tested/used yet ? Or you still doing breaking changes ?
Hello, The company who I am working for have some python developpers and may help you to build the RW API. How can we be in sync (seem that irc channel is more or less idle for that). Regards
Released the first beta of v2.0 today: https://github.com/digitalocean/netbox/releases/tag/v2.0-beta1
Please kick the tires and post to the mailing list or open a bug report for any issues.
Closing this out as the new API is essentially done. Further development and bug fixes will be handled as part of the beta process.
I would like to put in a formal request for writable APIs for the IPAM portion of Netbox. I would love to consider swinging IPAM over to Netbox from Bluecat Address Manager but I have some provisioning scripts that obtain IP's from our existing IPAM when provisioning customers but without that functionality, it won't work for me.