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

Nexus 9k. How to use command "copy ftp:|scp:|tftp: bootflash:" on Nexus 9K API

Artemio Romero
Cisco Employee
Cisco Employee

Hello guys:

    Seems that show commands and configuration commands work fine with Nexus API but there is not information on how to use API to copy to bootflash:, as when you apply the command, nexus asks you the source file name and the server authentication and ip.

It does not work to use something like "copy ftp://USER@X.X.X.X/FILENAME bootflash:" because at the end, it asks you for a password, and for some reason, sending multiple commands on the same API POST does not work for this case, it works for configuring regular stuff, sending "config t ; interface e1/1 ; no shut" for example, but sending something like:

 

{
  "ins_api": {
    "version": "1.0",
    "type": "cli_conf",
    "chunk": "0",
    "sid": "1",
    "input": "copy ftp: bootflash: ;file.txt ;VRF_NAME ;SERVER_IP ;user ;password",
    "output_format": "json"
  }
}

 

con the same API POST does not work, the answer at the end is:

 

{
    "jsonrpc": "2.0",
    "error": {
      "code": -32009,
      "message": "Request timeout",
      "data": {
        "msg": "\nEnter source filename: \n"
      }
}

 nexus times out because never receives the sourcefile name... even when the post has it.

0 Replies 0