netbox-community / pynetbox

Python API client library for Netbox.
Apache License 2.0
543 stars 167 forks source link

Render Elevation as SVG #505

Open darcuripan opened 1 year ago

darcuripan commented 1 year ago

I've managed to get the rack elevation as a list of devices

rack = netbox.dcim.racks.get(21)

device = rack.elevation.list()

and I know the REST API has the option to set render=json/svg, and I was wondering if there is an already existing way to do this in pynetbox or if it could be added in the future?

Thanks!

darcuripan commented 1 year ago

Just to follow up here, I tried this device = rack.elevation.list(render="svg") which gives this error: pynetbox.core.query.ContentError: The server returned invalid (non-json) data. Maybe not a NetBox server?

so it seems like that it is returning the svg, but pynetbox won't allow for non-json data responses. Is there some way to circumvent that warning?

abhi1693 commented 10 months ago

What would be the use case to render the SVG using pynetbox?