Skip to main content
A newer release of this product is available.

Retrieve ports

Contributors

GET /network/ethernet/ports

Retrieves a collection of ports (physical, VLAN and LAG) for an entire cluster.

  • network port show

  • network port ifgrp show

  • network port vlan show

Parameters

Name Type In Required Description

mac_address

string

query

False

Filter by mac_address

speed

integer

query

False

Filter by speed

state

string

query

False

Filter by state

mtu

integer

query

False

Filter by mtu

name

string

query

False

Filter by name

node.uuid

string

query

False

Filter by node.uuid

node.name

string

query

False

Filter by node.name

vlan.base_port.name

string

query

False

Filter by vlan.base_port.name

vlan.base_port.node.name

string

query

False

Filter by vlan.base_port.node.name

vlan.base_port.uuid

string

query

False

Filter by vlan.base_port.uuid

vlan.tag

integer

query

False

Filter by vlan.tag

enabled

boolean

query

False

Filter by enabled

uuid

string

query

False

Filter by uuid

broadcast_domain.ipspace.name

string

query

False

Filter by broadcast_domain.ipspace.name

broadcast_domain.uuid

string

query

False

Filter by broadcast_domain.uuid

broadcast_domain.name

string

query

False

Filter by broadcast_domain.name

type

string

query

False

Filter by type

lag.active_ports.name

string

query

False

Filter by lag.active_ports.name

lag.active_ports.node.name

string

query

False

Filter by lag.active_ports.node.name

lag.active_ports.uuid

string

query

False

Filter by lag.active_ports.uuid

lag.distribution_policy

string

query

False

Filter by lag.distribution_policy

lag.mode

string

query

False

Filter by lag.mode

lag.member_ports.name

string

query

False

Filter by lag.member_ports.name

lag.member_ports.node.name

string

query

False

Filter by lag.member_ports.node.name

lag.member_ports.uuid

string

query

False

Filter by lag.member_ports.uuid

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

_links

num_records

integer

records

array[port]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "records": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "broadcast_domain": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "ipspace": {
        "name": "ipspace1"
      },
      "name": "bd1",
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
    },
    "lag": {
      "active_ports": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "e1b",
        "node": {
          "name": "node1"
        },
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "distribution_policy": "port",
      "member_ports": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "e1b",
        "node": {
          "name": "node1"
        },
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "mode": "multimode_lacp"
    },
    "mac_address": "01:02:03:04:05:06",
    "mtu": 1500,
    "name": "e1b",
    "node": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "node1",
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
    },
    "speed": 1000,
    "state": "up",
    "type": "vlan",
    "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412",
    "vlan": {
      "base_port": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "e1b",
        "node": {
          "name": "node1"
        },
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "tag": 100
    }
  }
}

Error

Status: Default, Error
Name Type Description

error

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

Name Type Description

next

href

self

href

Name Type Description

self

href

ipspace

Name Type Description

name

string

Name of the broadcast domain's IPspace

broadcast_domain

Broadcast domain UUID along with a readable name. Either the UUID or both names may be provided on input.

Name Type Description

_links

_links

ipspace

ipspace

name

string

Name of the broadcast domain, scoped to its IPspace

uuid

string

Broadcast domain UUID

node

Name Type Description

name

string

Name of node on which the port is located.

active_ports

Port UUID along with readable names. Either the UUID or both names may be supplied on input.

Name Type Description

_links

_links

name

string

node

node

uuid

string

member_ports

Port UUID along with readable names. Either the UUID or both names may be supplied on input.

Name Type Description

_links

_links

name

string

node

node

uuid

string

lag

Name Type Description

active_ports

array[active_ports]

Active ports of a LAG (ifgrp). (Some member ports may be inactive.)

distribution_policy

string

Policy for mapping flows to ports for outbound packets through a LAG (ifgrp).

member_ports

array[member_ports]

mode

string

Determines how the ports interact with the switch.

node

Name Type Description

_links

_links

name

string

uuid

string

base_port

Port UUID along with readable names. Either the UUID or both names may be supplied on input.

Name Type Description

_links

_links

name

string

node

node

uuid

string

vlan

Name Type Description

base_port

base_port

Port UUID along with readable names. Either the UUID or both names may be supplied on input.

tag

integer

VLAN ID

port

Name Type Description

_links

_links

broadcast_domain

broadcast_domain

Broadcast domain UUID along with a readable name. Either the UUID or both names may be provided on input.

enabled

boolean

lag

lag

mac_address

string

mtu

integer

MTU of the port in bytes. Set by broadcast domain.

name

string

Portname, such as e0a, e1b-100 (VLAN on ethernet), a0c (LAG/ifgrp), a0d-200 (vlan on LAG/ifgrp)

node

node

speed

integer

Link speed in Mbps

state

string

Operational state of the port.

type

string

Type of physical or virtual port

uuid

string

Port UUID

vlan

vlan

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

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.