Skip to content
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

Add JSON/YAML import support for all objects #4347

Closed
jeremystretch opened this issue Mar 11, 2020 · 7 comments
Closed

Add JSON/YAML import support for all objects #4347

jeremystretch opened this issue Mar 11, 2020 · 7 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

Proposed Changes

Allow users to import objects in YAML or JSON format in addition to the existing support for CSV. YAML/JSON support was introduced for device types in #451; this extends that same functionality to all models.

Justification

JSON and YAML offer greater flexibility than CSV in incorporating related instances, as well as referencing parent objects.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application labels Mar 11, 2020
@jeremystretch jeremystretch added this to the v2.9 milestone Mar 11, 2020
@BarbarossaTM
Copy link
Contributor

This is really cool, thanks!

Are there any plans to allow import of a full export with multiple items (for examples device types) at once? This would be really awesome!

Thanks and best
Max

@jeremystretch jeremystretch removed this from the v2.9 milestone Jul 6, 2020
@jeremystretch jeremystretch added needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed status: accepted This issue has been accepted for implementation labels Jul 24, 2020
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed needs milestone Awaiting prioritization for inclusion with a future NetBox release labels May 25, 2021
@jeremystretch jeremystretch added this to the v3.1 milestone May 25, 2021
@kjetilho
Copy link

kjetilho commented Jul 6, 2021

One use case for this feature: The changelog holds the JSON object for deleted objects, and it would be very convenient if this could be fed directly into an Import Device dialog to get an undo feature. (Since the JSON contains numeric ids for stuff like site or device_type, it is not so convenient to recreate the device by hand.)

@jeremystretch
Copy link
Member Author

Punting this to v3.2 as we'll likely need to refactor the current JSON/YAML import view substantially to accommodate models beyond device type.

@jeremystretch jeremystretch modified the milestones: v3.1, v3.2 Oct 19, 2021
@sol1-matt
Copy link

The import/export of device types already supports YAML but has limitations (discussion #6228). It works differently from normal import/export so don't know if would fall under the umbrella of this issue.

The ability to automatically create the linked objects is nice but the inability to bulk import isn't.

If there is to be a refactor consideration of device types would be useful.

@tom0010
Copy link

tom0010 commented Sep 2, 2022

One use case for this feature: The changelog holds the JSON object for deleted objects, and it would be very convenient if this could be fed directly into an Import Device dialog to get an undo feature. (Since the JSON contains numeric ids for stuff like site or device_type, it is not so convenient to recreate the device by hand.)

Also looking for this type of thing.

In this release, would it be possible to do that via the API too?

@jsenecal
Copy link
Contributor

jsenecal commented Sep 2, 2022

One use case for this feature: The changelog holds the JSON object for deleted objects, and it would be very convenient if this could be fed directly into an Import Device dialog to get an undo feature. (Since the JSON contains numeric ids for stuff like site or device_type, it is not so convenient to recreate the device by hand.)

Also looking for this type of thing.

In this release, would it be possible to do that via the API too?

What do you mean by "do that via the API too" ?

@tom0010
Copy link

tom0010 commented Sep 2, 2022

Bulk import NetBox information in json format via the API as well as in the GUI.

In this issue, my understanding is that you could bulk import yaml AND json, therefore I am assuming it's just the GUI.
Even though yaml and json follow the same model as such, from how I am reading it, it seems like this is a just GUI functionality. So I'd like to have the ability to do that via the API too if possible.

jeremystretch added a commit that referenced this issue Nov 15, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

7 participants