Replies: 4 comments 2 replies
-
Also if there's an easier way to export schedule a spreadsheet export, I'd be happy to hear it. |
Beta Was this translation helpful? Give feedback.
-
You can use an export template to export the data into a csv that you then can open with excel if that is what you want. GET /api/dcim/sites/?export=MyTemplateName If you have an external system you could setup a web hook to trigger a script that call the API and saves the created file whre you want to have it. The problem with a custom script is how you want to save the output? The option to return text, which can be a CSV format is not really suitable for a lot of data and you still would have to fetch the output data manually or via API. Not sure why you want to export it to spreadsheets and not use the NetBox UI, but you might have your reasons. |
Beta Was this translation helpful? Give feedback.
-
We use Not sure about "easy", but it's a method. CSV is much easier if you're okay with that format. |
Beta Was this translation helpful? Give feedback.
-
A custom script can write data to a Google Sheet. https://developers.google.com/sheets/api/quickstart/python |
Beta Was this translation helpful? Give feedback.
-
Is it possible to create a netbox "Script" that exports a spreadsheet?
Specifically I'm looking to create an Event Rule that will run a script to export IP Addresses into a spreadsheet on the server whenever an IP Address is deletd, changed, or updated.
I'm not sure what that python script would look like though. I've looked through the documentation on scripts, but it's not clear how I would access elements of an IP Address object, or tell the system to run an export to a specific folder.
Beta Was this translation helpful? Give feedback.
All reactions