netbox icon indicating copy to clipboard operation
netbox copied to clipboard

additional url field on api responses that has the ui url to an object

Open ITJamie opened this issue 1 year ago • 0 comments

NetBox version

feature branch

Feature type

New functionality

Proposed functionality

when using the Rest API the url field on objects has direct API URLs. it would be great if there was a "display_url" or "ui_url" to use when referencing the object in external tools

removing /api from the the API URL doesn't always work to get to a UI URL.

This could be an optional non-default field that could be requested if needed now that https://github.com/netbox-community/netbox/issues/15087 is possible in the feature branch

Use case

when using the api sometimes we send slack alerts or emails for specific issues we find with data for a human to visit and interfact with / fix

with most objects we can strip '/api' from the URL and give that URL to users, however not all objects follow that (eg virtual-disks on vms)

example: UI url: http://netbox_instance/virtualization/disks/1/ API URL:http://netbox_instance/api/virtualization/virtual-disks/1/

Database changes

No response

External dependencies

No response

ITJamie avatar Feb 14 '24 19:02 ITJamie