Replies: 2 comments
-
By using a custom wrapper for Web API responses, you can ensure that all of your responses have a consistent structure, and you can also include custom metadata. This article presents a discussion on how we can decorate Web API responses with useful information. Let's understand the problem we are trying to solve. For more detail also see https://github.com/netbox-community/goslotonetbox/discussions/9091 |
Beta Was this translation helpful? Give feedback.
-
I think it would be nice if there would be a straightforward way to extend the router regisrty of Netbox apps with regisrty of plugin apps, so relations of Netbox app classes to plugin app classes could be represented in API. Currently it is possible only the other way around with using Netbox's builtin nested serializers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When you make a plugin and you add a foreign key relationship to a core model eg to
ipam.IPAddress
it would be nice to have theipam/ip-address
api response return that new relationship.This would make plugins feel more integrated into the api models and less isolated away from the models they are referencing.
I wouldn't expect anything more than "Read-Only" views of the extended data. Similar to the "rules_count" on the access-list example plugin
While right now we can extend the GUI views of a core model object with extra cards, views etc, The api responses cant be (at least as far as I have been able to tell)
I understand that we wouldn't want every foreignkey to be listed, so maybe a way to declare with your plugin config which foreignkeys should show per model?
@jeremystretch @ryanmerolle
Beta Was this translation helpful? Give feedback.
All reactions