Considerations for ports and interfaces

The RESTv1API provides theinterfacesresource to configure and get information about switch ports and interfaces of all types. You do not use theportsresource to manage ports.

Hardware (system) interfaces

  • Hardware interfaces are of typesystem.

  • Hardware interfaces are included in the database automatically.

  • Interfaces of typesystemcannot be added or deleted.

LAG interfaces

  • LAG interfaces are of typelag.

  • 您可以使用the DELETE method to delete a LAG interface.

Example of creating a LAG interface with member ports 1/1/1 and 1/1/2:

Method and URI:

POST "/rest/v1/system/interfaces"

Request body:

{ "name": "lag50", "vrf": "/rest/v1/system/vrfs/default", "type": "lag", "interfaces": [ "/rest/v1/系统/接口/ 1% 2 f1 % 2 f1”、“/ rest /v1/system/interfaces/1%2F1%2F2" ] }

VLAN interfaces

  • VLAN interfaces are of typevlan.

  • 您可以使用the DELETE method to delete a VLAN interface.

Example of creating a VLAN interface:

Method and URI:

POST "/rest/v1/system/interfaces"

Request body:

{ "name": "vlan2", "vlan_tag": "/rest/v1/system/vlans/2", "vrf": "/rest/v1/system/vrfs/default", "type": "vlan" }