netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.37k stars 2.49k forks source link

Inconsistent GUI to API path for VM disks #14861

Open stavr666 opened 5 months ago

stavr666 commented 5 months ago

NetBox version

v3.7.1

Feature type

Change to existing functionality

Proposed functionality

By now, any GUI path that look like:

http(s)://netbox/something/?filters

Can be easy switched to API dataset by adding /api:

http(s)://netbox/api/something/?filters

With VM disk model, for some reason it's looks like:

http(s)://netbox/virtualization/disks/?filters

in GUI. But api path looks like:

http(s)://netbox/api/virtualization/virtual-disks/?filters

Use same pattern, please. Fix GUI path, I suppose, it will not break API solutions.

Use case

Switching back and forth between GUI and API data representation.

Database changes

No response

External dependencies

No response

abhi1693 commented 5 months ago

This is a breaking change and will have to wait until the next minor/major release.

jeffgdotorg commented 3 months ago

Thanks for catching this inconsistency.

I'm flagging it for engineering review to determine whether we want to tackle it during the v4.0 beta period, or defer it to v4.1 main development.

jeremystretch commented 3 months ago

To be clear, keeping URL paths consistent between the UI and REST API is not a design goal; it generally happens out of coincidence as both are structured very similarly. There are however plenty of examples where they diverge, and this is perfectly fine.

Maybe #15156 would obviate the perceived need for them to match?