-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch IP Address Record Update #2480
Comments
Don't forget you can do INSERTs and UPDATEs directly on the underlying postgres database. It's well-structured and there is referential integrity. Obviously you need to be careful not to do silly things which the web interface or API would prevent. There is a risk that creeping changes can turn a RESTI API into an unholy chimera. For a perfect example of this take a look at Salesforce:
That's not even scratching the surface - "a mess" doesn't even start to describe it. So be careful what you wish for :-) |
That's one more spot where GraphQL would shine. But it's most probably never going to happen. See #2007 |
GraphQL looks cool. I guess you would create Mutations to allow the batch updates the OP was asking for. Then all you have to do is rewrite the UI in Javascript to talk to GraphQL, and you have re-implemented the whole application :-) |
It would indeed be useful for this: One request to fetch all information required to render the content. (This gets OT.) |
NetBox employs the Django REST Framework (a third-party extension to the Django framework) for its API. I don't believe this functionality is currently supported by DRF. There was some work done on an external package called django-rest-framework-bulk but it is no longer maintained and almost certainly incompatible with recent releases. We can revisit this if support is introduced in DRF, but it's probably not something we want to tackle directly. Regarding your specific use case, it is inadvisable to record hostnames in the description field of IP addresses: The device name is already accessible at
|
Environment
Proposed Functionality
Enable enhanced REST functionality -
specifically, add PATCH method for HTTP interactions.
Use Case
This specific use case proposes that a feature be added that would allow batch updates to IP address records. For example, in this instance I would be utilizing the REST API to edit several thousand of them at once - updating their description fields to contain their hostnames.
The benefit of this feature would be increased ease of use. I work for a company with thousands of end users and this would greatly increase efficiency when recording updates to our network environment. We recently switched to your IPAM system and are missing host names as a result of human error during our initial data migration. I have been working around this through scripting but it's been a chore, and it seems like this enhancement wouldn't necessarily be something too difficult to implement on your end, but I could be wrong. Let me know what you think!
The text was updated successfully, but these errors were encountered: