Retrieve Ethernet switch ports
GET /network/ethernet/switch/ports
Introduced In: 9.8
Retrieves the ethernet switch ports.
Related ONTAP commands
-
system switch ethernet interface show
Learn more
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
statistics.receive_raw.discards |
integer |
query |
False |
Filter by statistics.receive_raw.discards |
statistics.receive_raw.errors |
integer |
query |
False |
Filter by statistics.receive_raw.errors |
statistics.receive_raw.packets |
integer |
query |
False |
Filter by statistics.receive_raw.packets |
statistics.transmit_raw.discards |
integer |
query |
False |
Filter by statistics.transmit_raw.discards |
statistics.transmit_raw.errors |
integer |
query |
False |
Filter by statistics.transmit_raw.errors |
statistics.transmit_raw.packets |
integer |
query |
False |
Filter by statistics.transmit_raw.packets |
statistics.timestamp |
string |
query |
False |
Filter by statistics.timestamp
|
configured |
string |
query |
False |
Filter by configured |
isl |
boolean |
query |
False |
Filter by isl |
duplex_type |
string |
query |
False |
Filter by duplex_type |
mtu |
integer |
query |
False |
Filter by mtu |
remote_port.functional_roles |
string |
query |
False |
Filter by remote_port.functional_roles
|
remote_port.device.node.uuid |
string |
query |
False |
Filter by remote_port.device.node.uuid |
remote_port.device.node.name |
string |
query |
False |
Filter by remote_port.device.node.name |
remote_port.device.discovered_name |
string |
query |
False |
Filter by remote_port.device.discovered_name
|
remote_port.device.shelf.module |
string |
query |
False |
Filter by remote_port.device.shelf.module
|
remote_port.device.shelf.name |
string |
query |
False |
Filter by remote_port.device.shelf.name
|
remote_port.device.shelf.uid |
string |
query |
False |
Filter by remote_port.device.shelf.uid |
remote_port.mtu |
integer |
query |
False |
Filter by remote_port.mtu |
remote_port.name |
string |
query |
False |
Filter by remote_port.name |
state |
string |
query |
False |
Filter by state |
mac_address |
string |
query |
False |
Filter by mac_address |
switch.name |
string |
query |
False |
Filter by switch.name |
type |
string |
query |
False |
Filter by type |
roles.type |
string |
query |
False |
Filter by roles.type
|
roles.dr_group |
string |
query |
False |
Filter by roles.dr_group
|
roles.zone |
integer |
query |
False |
Filter by roles.zone
|
vpc_peer_link |
boolean |
query |
False |
Filter by vpc_peer_link
|
vlan_id |
integer |
query |
False |
Filter by vlan_id |
speed |
integer |
query |
False |
Filter by speed |
identity.number |
integer |
query |
False |
Filter by identity.number |
identity.breakout.physical_port |
string |
query |
False |
Filter by identity.breakout.physical_port
|
identity.breakout.number |
integer |
query |
False |
Filter by identity.breakout.number
|
identity.name |
string |
query |
False |
Filter by identity.name |
identity.index |
integer |
query |
False |
Filter by identity.index |
fields |
array[string] |
query |
False |
Specify the fields to return. |
max_records |
integer |
query |
False |
Limit the number of records returned. |
return_records |
boolean |
query |
False |
The default is true for GET calls. When set to false, only the number of records is returned.
|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
|
order_by |
array[string] |
query |
False |
Order results by specified fields and optional [asc |
Response
Status: 200, Ok
Name | Type | Description |
---|---|---|
_links |
||
num_records |
integer |
Number of Records |
records |
array[switch_port] |
Example response
{
"_links": {
"next": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"num_records": 1,
"records": [
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"configured": "string",
"duplex_type": "string",
"identity": {
"breakout": {
"number": 1,
"physical_port": "Ethernet1/9"
},
"index": 0,
"name": "string",
"number": 0
},
"mac_address": "string",
"mtu": 0,
"remote_port": {
"device": {
"discovered_name": "stiA400-311",
"node": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "node1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"shelf": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"module": "string",
"name": "1.1",
"uid": "12439000444923584512"
}
},
"functional_roles": [
"string"
],
"mtu": 0,
"name": "string"
},
"roles": [
{
"dr_group": "string",
"type": "string"
}
],
"speed": 0,
"state": "string",
"statistics": {
"receive_raw": {
"discards": 100,
"errors": 200,
"packets": 500
},
"timestamp": "2024-11-18 10:52:17 -0500",
"transmit_raw": {
"discards": 100,
"errors": 200,
"packets": 500
}
},
"switch": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "RTP-SS01-510R03(FOC223443KQ)"
},
"type": "string",
"vlan_id": [
"integer"
]
}
]
}
Error
Status: Default, Error
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
collection_links
Name | Type | Description |
---|---|---|
next |
||
self |
self_link
Name | Type | Description |
---|---|---|
self |
breakout
Name | Type | Description |
---|---|---|
number |
integer |
Breakout port sub-interface number. |
physical_port |
string |
Breakout physical port name. |
identity
Name | Type | Description |
---|---|---|
breakout |
||
index |
integer |
Interface Index. |
name |
string |
Interface Name. |
number |
integer |
Interface Number. |
_links
Name | Type | Description |
---|---|---|
self |
node
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
|
uuid |
string |
shelf
Shelf connected to this port.
Name | Type | Description |
---|---|---|
_links |
||
module |
string |
Shelf module connected to this port. |
name |
string |
|
uid |
string |
device
Device connected to port.
Name | Type | Description |
---|---|---|
discovered_name |
string |
Raw name of the discovered device. |
node |
||
shelf |
Shelf connected to this port. |
remote_port
Remote port.
Name | Type | Description |
---|---|---|
device |
Device connected to port. |
|
functional_roles |
array[string] |
|
mtu |
integer |
MTU in octets. |
name |
string |
Remote port name. |
roles
Allowed use for this port.
Name | Type | Description |
---|---|---|
dr_group |
string |
DR group. |
type |
string |
Allowed use type. |
zone |
integer |
Zone ID to differentiate between roles with the same type. |
receive_raw
Packet receive counters for the Ethernet port.
Name | Type | Description |
---|---|---|
discards |
integer |
Total number of discarded packets. |
errors |
integer |
Number of packet errors. |
packets |
integer |
Total packet count. |
transmit_raw
Packet transmit counters for the Ethernet port.
Name | Type | Description |
---|---|---|
discards |
integer |
Total number of discarded packets. |
errors |
integer |
Number of packet errors. |
packets |
integer |
Total packet count. |
statistics
These are raw counters for the device associated with the Ethernet port.
Name | Type | Description |
---|---|---|
receive_raw |
Packet receive counters for the Ethernet port. |
|
timestamp |
string |
The time the statistics were gathered. |
transmit_raw |
Packet transmit counters for the Ethernet port. |
switch
The name of the specified cluster or storage switch.
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
switch_port
Ethernet Switch Port REST API
Name | Type | Description |
---|---|---|
_links |
||
configured |
string |
Administrative Status. |
duplex_type |
string |
Duplex Settings. |
identity |
||
isl |
boolean |
Is configured as an ISL link. |
mac_address |
string |
MAC Address. |
mtu |
integer |
MTU. |
remote_port |
Remote port. |
|
roles |
array[roles] |
|
speed |
integer |
Interface Speed(Mbps). |
state |
string |
Operational Status. |
statistics |
These are raw counters for the device associated with the Ethernet port. |
|
switch |
The name of the specified cluster or storage switch. |
|
type |
string |
Interface Type. |
vlan_id |
array[integer] |
|
vpc_peer_link |
boolean |
Is configured as a Virtual Port Channel (vPC) peer-link. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
returned_error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |