Considerations for ports and interfaces
The RESTv1API provides theinterfaces
resource to configure and get information about switch ports and interfaces of all types. You do not use theports
resource to manage ports.
Hardware (system) interfaces
Hardware interfaces are of type
system
.Hardware interfaces are included in the database automatically.
Interfaces of type
system
cannot be added or deleted.
LAG interfaces
LAG interfaces are of type
lag
.您可以使用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 type
vlan
.您可以使用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" }