Configuring an Ethernet Interface

Configuring an Interface as a Trunk Port and Enabling a List of Allowed VLANs

Configuring an Interface as a Trunk Port and Enabling a List of Allowed VLANs
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "id": "eth1/2",
            "mode": "trunk",
            "trunkVlans": "15-20"
          }
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
        <mode>trunk</mode>
        <trunkVlans>15-20</trunkVlans>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

The example in this section configures an interface as a trunk port and enables a list of trunk VLANs. When this API call executes, an l1PhysIf object named "phys-[eth1/2]" (/sys/intf/phys-[eth1/2]/) is created in the MO database, as well as several other objects that are required for port-channel functionality.

The phys-[eth1/2] object holds the configuration for the interface that is configured as a trunk port.

To verify that the interface configuration was created, issue an HTTP GET request to query the following URI.


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

interface ethernet 1/2
 switchport mode trunk
 switchport trunk allowed vlan 15-20

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Querying a Trunk Port Configuration

Querying a Trunk Port Configuration
GET http://<mgmt0_IP>/api/mo/sys/intf/phys-[eth1/2].json
{
    "totalCount": "1",
    "imdata": [
        {
            "l1PhysIf": {
                "attributes": {
                    "FECMode": "auto",
                    "accessVlan": "vlan-1",
                    "adminSt": "up",
                    "autoNeg": "on",
                    "beacon": "off",
                    "bw": "default",
                    "childAction": "",
                    "controllerId": "",
                    "delay": "1",
                    "descr": "",
                    "dfeTuningDelay": "100",
                    "dn": "sys/intf/phys-[eth1/2]",
                    "dot1qEtherType": "33024",
                    "duplex": "auto",
                    "ethpmCfgFailedBmp": "",
                    "ethpmCfgFailedTs": "0",
                    "ethpmCfgState": "0",
                    "id": "eth1/2",
                    "inhBw": "4294967295",
                    "layer": "Layer2",
                    "linkDebounce": "100",
                    "linkDebounceLinkUp": "0",
                    "linkLog": "default",
                    "linkTransmitReset": "enable",
                    "mdix": "auto",
                    "medium": "broadcast",
                    "modTs": "2019-03-05T15:44:29.284+00:00",
                    "mode": "trunk",
                    "mtu": "1500",
                    "name": "",
                    "nativeVlan": "vlan-1",
                    "packetTimestampEgressSourceId": "0",
                    "packetTimestampIngressSourceId": "0",
                    "packetTimestampState": "disable",
                    "persistentOnReload": "true",
                    "portT": "leaf",
                    "routerMac": "not-applicable",
                    "snmpTrapSt": "enable",
                    "spanMode": "not-a-span-dest",
                    "speed": "auto",
                    "speedGroup": "auto",
                    "status": "",
                    "switchingSt": "disabled",
                    "trunkLog": "default",
                    "trunkVlans": "15-20",
                    "usage": "discovery",
                    "userCfgdFlags": "admin_layer",
                    "vlanmgrCfgFailedBmp": "",
                    "vlanmgrCfgFailedTs": "0",
                    "vlanmgrCfgState": "0",
                    "voicePortCos": "none",
                    "voicePortTrust": "disable",
                    "voiceVlanId": "none",
                    "voiceVlanType": "none"
                }
            }
        }
    ]
}

The example in this section queries the trunk port interface configuration that was specified in the previous POST request.

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring an Interface as a Layer 2 Access Port and Enabling an Access VLAN

Configuring an Interface as a Layer 2 Access Port and Enabling an Access VLAN
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "accessVlan": "vlan-150",
            "id": "eth1/2",
            "mode": "access"
          }
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
        <accessVlan>vlan-150</accessVlan>
        <mode>access</mode>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

This example configures an interface as a layer 2 access port and enables an access VLAN.

When the POST request executes, the l1PhysIf object that was created in the previous POST request "phys-[eth1/2]" (/sys/intf/phys-[eth1/2]/) is reconfigured to be a layer 2 access port.


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

interface ethernet 1/2
 switchport mode access
  switchport access vlan 150

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Querying an Access Port Configuration

Querying an Access Port Configuration
GET http://<mgmt0_IP>/api/mo/sys/intf/phys-[eth1/2].json
{
    "totalCount": "1",
    "imdata": [
        {
            "l1PhysIf": {
                "attributes": {
                    "FECMode": "auto",
                    "accessVlan": "vlan-150",
                    "adminSt": "up",
                    "autoNeg": "on",
                    "beacon": "off",
                    "bw": "default",
                    "childAction": "",
                    "controllerId": "",
                    "delay": "1",
                    "descr": "",
                    "dfeTuningDelay": "100",
                    "dn": "sys/intf/phys-[eth1/2]",
                    "dot1qEtherType": "33024",
                    "duplex": "auto",
                    "ethpmCfgFailedBmp": "",
                    "ethpmCfgFailedTs": "0",
                    "ethpmCfgState": "0",
                    "id": "eth1/2",
                    "inhBw": "4294967295",
                    "layer": "Layer2",
                    "linkDebounce": "100",
                    "linkDebounceLinkUp": "0",
                    "linkLog": "default",
                    "linkTransmitReset": "enable",
                    "mdix": "auto",
                    "medium": "broadcast",
                    "modTs": "2019-03-05T16:17:06.171+00:00",
                    "mode": "access",
                    "mtu": "1500",
                    "name": "",
                    "nativeVlan": "vlan-1",
                    "packetTimestampEgressSourceId": "0",
                    "packetTimestampIngressSourceId": "0",
                    "packetTimestampState": "disable",
                    "persistentOnReload": "true",
                    "portT": "leaf",
                    "routerMac": "not-applicable",
                    "snmpTrapSt": "enable",
                    "spanMode": "not-a-span-dest",
                    "speed": "auto",
                    "speedGroup": "auto",
                    "status": "",
                    "switchingSt": "disabled",
                    "trunkLog": "default",
                    "trunkVlans": "15-20",
                    "usage": "discovery",
                    "userCfgdFlags": "admin_layer",
                    "vlanmgrCfgFailedBmp": "",
                    "vlanmgrCfgFailedTs": "0",
                    "vlanmgrCfgState": "0",
                    "voicePortCos": "none",
                    "voicePortTrust": "disable",
                    "voiceVlanId": "none",
                    "voiceVlanType": "none"
                }
            }
        }
    ]
}

The example in this section queries the access port interface configuration that was specified in the previous POST request.

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Issuing a Shut or No Shut of the Interface

Issuing a Shut or No Shut of the Interface
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "id": "eth1/2",
            "adminSt": "down"
          }
        }
      }
    ]
  }
}

The example in this section shows how to issue a shut or no shut for an interface. In this example, the interface that was first configured to be a trunk port and then reconfigured to be a layer 2 access port, as shown in previous sections, is brought down.

If the interface is up and you want to bring it down, change "adminSt": "up" to "adminSt": "down"

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Verifying the Shut or No Shut of an Interface

Verifying the Shut or No Shut of an Interface
GET http://<mgmt0_IP>/api/mo/sys/intf/phys-[eth1/2].json
{
    "totalCount": "1",
    "imdata": [
        {
            "l1PhysIf": {
                "attributes": {
                    "FECMode": "auto",
                    "accessVlan": "vlan-150",
                    "adminSt": "down",
                    "autoNeg": "on",
                    "beacon": "off",
                    "bw": "default",
                    "childAction": "",
                    "controllerId": "",
                    "delay": "1",
                    "descr": "",
                    "dfeTuningDelay": "100",
                    "dn": "sys/intf/phys-[eth1/2]",
                    "dot1qEtherType": "33024",
                    "duplex": "auto",
                    "ethpmCfgFailedBmp": "",
                    "ethpmCfgFailedTs": "0",
                    "ethpmCfgState": "0",
                    "id": "eth1/2",
                    "inhBw": "4294967295",
                    "layer": "Layer2",
                    "linkDebounce": "100",
                    "linkDebounceLinkUp": "0",
                    "linkLog": "default",
                    "linkTransmitReset": "enable",
                    "mdix": "auto",
                    "medium": "broadcast",
                    "modTs": "2019-03-05T16:26:46.062+00:00",
                    "mode": "access",
                    "mtu": "1500",
                    "name": "",
                    "nativeVlan": "vlan-1",
                    "packetTimestampEgressSourceId": "0",
                    "packetTimestampIngressSourceId": "0",
                    "packetTimestampState": "disable",
                    "persistentOnReload": "true",
                    "portT": "leaf",
                    "routerMac": "not-applicable",
                    "snmpTrapSt": "enable",
                    "spanMode": "not-a-span-dest",
                    "speed": "auto",
                    "speedGroup": "auto",
                    "status": "",
                    "switchingSt": "disabled",
                    "trunkLog": "default",
                    "trunkVlans": "15-20",
                    "usage": "discovery",
                    "userCfgdFlags": "admin_layer",
                    "vlanmgrCfgFailedBmp": "",
                    "vlanmgrCfgFailedTs": "0",
                    "vlanmgrCfgState": "0",
                    "voicePortCos": "none",
                    "voicePortTrust": "disable",
                    "voiceVlanId": "none",
                    "voiceVlanType": "none"
                }
            }
        }
    ]
}

The example in this section queries the trunk port interface configuration that was specified in the previous POST request.

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring an IPv4 Address for an Interface

Configuring ACL TCAM Region with e-racl TCAM Carving
POST http://<IP_address>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"ipv4Entity": {
  "children": [
{
  "ipv4Inst": {
    "children": [
{
"ipv4Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv4If": {
    "attributes": {
      "id": "eth1/1"
    },
"children": [
{
"ipv4Addr": {
  "attributes": {
    "addr": "10.0.0.1/10"
}}}]}}]}}]}}]}}]}}

The HTTP request in this example assigns an IPv4 address to an interface.

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

QUERY PARAMETERS

No query parameters

Configuring User Flags

Configuring User Flags
POST  
http://<IP_Address>172.31.200.141/api/mo/sys/intf/phys-[eth1/2].json
{
  "l1PhysIf" : {
    "attributes" : {
      "id" : "eth1/2",
     “layer" : “Layer2”,
      "userCfgdFlags" : "admin_layer"
}}}
Configuring User Flags
POST  
http://<IP_Address>/api/mo/sys/intf/phys-[eth1/2].json 
{
  "l1PhysIf" : {
    "attributes" : {
      "id" : "eth1/2",
      "layer" : “Layer3”,
      "mtu" : "5000",
      "adminSt" : "up",
      "userCfgdFlags" : "admin_layer,admin_mtu,admin_state"
}}}

User configured flags (REST property userCfgdFlags in l1PhysIf and pcAggrIf MOs) are used to indicate that a property (layer, admin state, and/or mtu) has been configured by the user.
If these flags are not set, you may experience configuration loss (for layer, admin state, and MTU) on the reload of the system.
Interfaces with the “admin_layer” and/or “admin_state” value set for “userCfgdFlags” will be unaffected by the system default switchport and system default switchport shutdown commands (respectively). User configured flags are automatically set correctly when CLI is executed, and only must be manually set for REST.

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Creating a Subinterface under a Main Interface

Creating a Subinterface under a Main Interface
POST http://<IP_address>/api/mo/sys/intf.json
{
 "l3EncRtdIf" : {
    "attributes" : {
        "id" : "eth3/27.100"
        "descr": "new interface 100"
        "encap": "vlan-100",
        "adminSt": "up"
        "mediumType" : "p2p"
}}}
{
    imdata": []
}

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

QUERY PARAMETERS

Querying the State of a Subinterface

Querying the State of a Subinterface
POST http://<IP_address>/api/mo/sys/intf/encrtd-[eth3/27.100].json
{
  "totalCount": "1",
  "imdata": [
    {
      "l3EncRtdIf": {
        "attributes": {
          "adminSt": "up",
          "bw": "0",
          "childAction": "",
          "delay": "1",
          "descr": "",
          "dn": "sys/intf/encrtd-[eth3/27.100]",
          "encap": "vlan-100",
          "ethpmCfgFailedBmp": "",
          "ethpmCfgFailedTs": "00:00:00:00.000",
          "ethpmCfgState": "0",
          "id": "eth3/27.100",
          "ifConnDn": "",
          "lcOwn": "local",
          "linkLogEn": "default",
          "mediumType": "broadcast",
          "modTs": "2015-07-16T04:21:02.065+00:00",
          "monPolDn": "",
          "mtu": "1500",
          "mtuInherit": "yes",
          "name": "",
          "routerMac": "00:00:00:00:00:00",
          "status": ""
}}}]}

The example in this section queries the state of a specified subinterface.

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

QUERY PARAMETERS

No query parameters

Configuring a Fabric-Facing Port on an Ethernet Interface

Configuring a Fabric-Facing Port on an Ethernet Interface
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "id": "eth1/1"
          },
          "children": [
            {
              "l1PhysIfExtended": {
                "attributes": {
                  "portTypeFabric": "yes"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/1</id>
        <physExtd-items>
          <portTypeFabric>yes</portTypeFabric>
        </physExtd-items>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

interface ethernet 1/1
 port-type fabric

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Fabric-Facing Port configured on an Ethernet Interface

Deleting a Fabric-Facing Port configured on an Ethernet Interface
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "id": "eth1/1"
          },
          "children": [
            {
              "l1PhysIfExtended": {
                "attributes": {
                  "portTypeFabric": "no"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/1</id>
        <physExtd-items>
          <portTypeFabric>no</portTypeFabric>
        </physExtd-items>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

interface ethernet 1/1
 no port-type fabric

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring Packet Timestamping (Egress Direction)

Configuring Packet Timestamping (Egress Direction) 
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "id": "eth1/3",
            "packetTimestampEgressSourceId": "123",
            "packetTimestampState": "enable-egress"
          }
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/3</id>
        <packetTimestampEgressSourceId>123</packetTimestampEgressSourceId>
        <packetTimestampState>enable-egress</packetTimestampState>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.2(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

interface ethernet 1/3
 timestamp egress id 123

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring Packet Timestamping (Ingress Direction)

Configuring Packet Timestamping (Ingress Direction) 
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "id": "eth1/3",
            "packetTimestampIngressSourceId": "123",
            "packetTimestampState": "enable-ingress"
          }
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/3</id>
        <packetTimestampIngressSourceId>123</packetTimestampIngressSourceId>
        <packetTimestampState>enable-ingress</packetTimestampState>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.2(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

interface ethernet 1/3
 timestamp ingress id 123

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring Packet Timestamping (Ingress and Egress Directions)

Configuring Packet Timestamping (Ingress and Egress Directions) 
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "id": "eth1/3",
            "packetTimestampEgressSourceId": "123",
            "packetTimestampIngressSourceId": "123",
            "packetTimestampState": "enable-both"
          }
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/3</id>
        <packetTimestampEgressSourceId>123</packetTimestampEgressSourceId>
        <packetTimestampIngressSourceId>123</packetTimestampIngressSourceId>
        <packetTimestampState>enable-both</packetTimestampState>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.2(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

interface ethernet 1/3
 timestamp ingress id 123 egress id 123

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Packet Timestamp Configuration

Deleting a Packet Timestamp Configuration 
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
  "interfaceEntity": {
    "children": [
      {
        "l1PhysIf": {
          "attributes": {
            "id": "eth1/3",
            "packetTimestampState": "disable"
          }
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/3</id>
        <packetTimestampState>disable</packetTimestampState>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.2(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

interface ethernet 1/3
 no timestamp

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/