Send netdisco-users mailing list submissions to
        netdisco-users@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
        netdisco-users-requ...@lists.sourceforge.net

You can reach the person managing the list at
        netdisco-users-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:

   1. Re: Interface Type information through API (Saurabh Suman)
--- Begin Message ---
Hi Oliver,

Thanks for your response.

I couldn’t see the attribute “native” in the response of API the 
/api/v1/object/device/{ip}/port/{port}/vlans.

Find the sample response of the API below :

[
  {
    "last_discover": "2024-01-10 07:05:38.298692",
    "ip":”XXX.YY.XY.YY”,
    "creation": "2024-01-10 07:05:38.298692",
    "description": "Default",
    "vlan": 1
  }
]

Kindly help me out

Regards,
Saurabh

From: Oliver Gorwits <oli...@cpan.org>
Sent: Saturday, January 6, 2024 7:49 PM
To: Saurabh Suman <ssu...@ordr.net>; netdisco-users@lists.sourceforge.net
Subject: Re: [Netdisco] Interface Type information through API

Hi Saurabh

The "mode" or type of the interface as you describe it is specific to the 
vendor, e.g. Cisco.

However there are some fields and API methods which can help you to work it out.

On the /api/v1/object/device/{ip}/ports method, the "type" field will tell you 
if the port is layer2 or layer3 (routed), e.g. values like "l3ipvlan" or 
"l2vlan" or "ieee8023adLag" or "propVirtual" are all different modes.

On the /api/v1/object/device/{ip}/port/{port}/vlans method you can get the list 
of VLANs on the port, and there is a "native" field. If there are rows where 
"native" is "false" for a port, it is likely to be a "trunk" for VLANs.

regards
Oliver.

On Fri, 1 Dec 2023 at 10:27, Saurabh Suman via netdisco-users 
<netdisco-users@lists.sourceforge.net<mailto:netdisco-users@lists.sourceforge.net>>
 wrote:
Hi Team,

I would like to know the interface type(ACCESS, ROUTED, TRUNK) for network 
devices.

I tried the API : /api/v1/object/device/{ip}/ports.

Help me to get this info

Regards,
Saurabh
_______________________________________________
Netdisco mailing list
netdisco-users@lists.sourceforge.net<mailto:netdisco-users@lists.sourceforge.net>
https://sourceforge.net/p/netdisco/mailman/netdisco-users/

--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to