IPAM Services retrievable by API #6912

Closed
opened 2025-12-29 19:46:35 +01:00 by adam · 3 comments
Owner

Originally created by @D1StrX on GitHub (Aug 30, 2022).

NetBox version

v3.3.1

Feature type

New functionality

Proposed functionality

  1. Extended functionality
    Extending existing functionality IPAM -> Services. When requesting a Virtual-machine data through GET it doesn't return the associated Service ports. Please include that information as well with virtual-machine, so no separate API request needs to be made.
  2. Improved search on the RestAPI docs page
    Currently only tags are findable through the search option. Which then list all underlying options.
    Would be nice if can support more specific search options. Thus when typing in Services it shows everything services related.
    Currently:
    image
    Improved:
    improved-search

Hence why I couldn't find Services initially :)

Use case

  1. Automate stuff that require (service)ports. For example for Ansible to configure Firewalls. HAproxy loadbalancers to automate backends (IP + Port). Probably a lot of more use cases, hopefully getting added in the comments.

  2. Faster/easier lookup

Database changes

I don't know. Probably yes.

External dependencies

Don't think so.

Originally created by @D1StrX on GitHub (Aug 30, 2022). ### NetBox version v3.3.1 ### Feature type New functionality ### Proposed functionality 1. Extended functionality Extending existing functionality IPAM -> Services. When requesting a Virtual-machine data through GET it doesn't return the associated Service ports. Please include that information as well with virtual-machine, so no separate API request needs to be made. 2. Improved search on the RestAPI docs page Currently only tags are findable through the search option. Which then list all underlying options. Would be nice if can support more specific search options. Thus when typing in Services it shows everything services related. Currently: ![image](https://user-images.githubusercontent.com/40062371/187926958-1b68e745-99dd-4125-9dbd-a026bbdb39f1.png) Improved: ![improved-search](https://user-images.githubusercontent.com/40062371/187927895-41737da5-4752-441e-b0b4-f403ee192730.png) Hence why I couldn't find Services initially :) ### Use case 1. Automate stuff that require (service)ports. For example for Ansible to configure Firewalls. HAproxy loadbalancers to automate backends (IP + Port). Probably a lot of more use cases, hopefully getting added in the comments. 2. Faster/easier lookup ### Database changes I don't know. Probably yes. ### External dependencies Don't think so.
adam added the type: feature label 2025-12-29 19:46:35 +01:00
adam closed this issue 2025-12-29 19:46:35 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 30, 2022):

A REST API endpoint (/api/ipam/services/) already exists to facilitate the creation of services and their attachment to devices and virtual machines. If this is not what you're requesting, please rewrite your initial post above to more clearly convey the proposed change(s).

@jeremystretch commented on GitHub (Aug 30, 2022): A REST API endpoint (`/api/ipam/services/`) already exists to facilitate the creation of services and their attachment to devices and virtual machines. If this is not what you're requesting, please rewrite your initial post above to more clearly convey the proposed change(s).
Author
Owner

@D1StrX commented on GitHub (Sep 1, 2022):

Refined the description @jeremystretch

@D1StrX commented on GitHub (Sep 1, 2022): Refined the description @jeremystretch
Author
Owner

@jeremystretch commented on GitHub (Sep 1, 2022):

When requesting a Virtual-machine data through GET it doesn't return the associated Service ports.

This is an established pattern for all related objects in NetBox and we won't deviate from it. You can use the services endpoint I mentioned to retrieve this data.

Improved search on the RestAPI docs page

This needs to be a separate FR.

@jeremystretch commented on GitHub (Sep 1, 2022): > When requesting a Virtual-machine data through GET it doesn't return the associated Service ports. This is an established pattern for all related objects in NetBox and we won't deviate from it. You can use the services endpoint I mentioned to retrieve this data. > Improved search on the RestAPI docs page This needs to be a separate FR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6912