cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
554
Views
0
Helpful
2
Replies

ND NDFC shut/noshut an inteface via the API

dan.laden
Level 1
Level 1

Was using the api documentation to understand shutting/no shutting a NDFC managed switch interface.

nd2.3/ndrc 12.1.

https://xxx/apidocs/#operation/adminstatus

the online example uses:

{

  • "operation": "shut",
  • "interfaces": [
    • {
      }
    ]

}

 

this fails for me when i update for my serial and interface (using postman and swagger test tool with json)

{
"operation""shut",
"interfaces": [
{
"serialNumber""xxxx",
"ifName""Ethernet1/1"
}
]
}
 
Looking at the chrome inspect data, the gui interaction has a superset of what is given in the example.  And the json test was successful with the fabric name being included.
{
"operation""shut",
"interfaces": [
{
"serialNumber""xxx",
"fabricName""xxxx",
"ifName""Ethernet1/1"
}
]
}
 
 
 FYI for others.

 

 

2 Replies 2

dan.laden
Level 1
Level 1

is there a means to send one post command and have a mixture of shut and no shut events....with above, it needs to be two unique post events?

Alexander Stevenson
Cisco Employee
Cisco Employee

Unfortunately, there is no mention of batching multiple operations in a single request in the API documentation, so it's safe to assume that the API doesn't support this functionality.

For each unique operation ("shut" or "no shut"), you would need to send separate API requests. This is also a safer approach as it allows you to handle the response and possible errors for each operation separately.

I recommend reaching out to Cisco TAC for more information and any possible updates to the API that might allow batch operations.

Here is an external mailer related to NDFC you could try as well:

cx-phd-ndfc-support@cisco.com