cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
621
Views
2
Helpful
5
Replies

upload vEdge file to vManage: validity string not found in request

urozman
Level 1
Level 1

Hello,

I would like to upload vEdge serialFile.viptela to vManage using vManage API.

I'm using api endpoint /dataservice/system/device/fileupload

I got an error:  {"error":{"message":File upload failed.","code":"VELIST0001","details":"Validity string not found in request for uploading vEdge list file.", "type": "error"}}

Where can I find more info about validity string, and where shold be provided?

Thank you!

5 Replies 5

Here https://developer.cisco.com/docs/sdwan/20-12/#!sd-wan-vmanage-v20-12

The error code VELIST0001 and details indicate that the API request is missing a required validity string or token that needs to be included when uploading a vEdge list file. This shows an example of the POST request

 

{
  "activityList": "[Number of vEdges uploaded successfully: 1, Uploaded vEdges (chassisId, serial number): ,  - ESR-6300-LIC-K9-FAUSTEST126, 030557201979336385BE]",
  "id": "b5091b8e-e5ea-4096-8e4c-f17d0d60f2dd",
  "vedgeListUploadMsg": "Number of vEdges uploaded successfully: 1",
  "vedgeListUploadStatus": "vEdge list uploaded successfully"
}

 

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

urozman
Level 1
Level 1

Hi @bigevilbeard Thank you!

what is the validity string that is mentioned, and where should it be send? In HTTP request headers I am sending cookie and x-xsrf-token already. Is there maybe code snippet for request? In the documentation I can only find response example.

Thank you!

 

 

The validity of a serial number file specifies whether or not the file is currently valid. A valid serial number file will allow the vManage device to authenticate and authorize WAN Edge devices in the network. An invalid serial number file will prevent the vManage device from authenticating and authorizing WAN Edge devices in the network.

The validity of a serial number file can be set to one of two values:

  • valid: The serial number file is currently valid and can be used to authenticate and authorize WAN Edge devices in the network.

  • invalid: The serial number file is currently invalid and cannot be used to authenticate and authorize WAN Edge devices in the network.

The validity of a serial number file can be changed by uploading a new serial number file with a different validity setting. For example, if you want to disable a serial number file, you can upload a new serial number file with the validity set to invalid.

It is important to note that the vManage device will ignore any serial number files that have a validity set to invalid. This means that WAN Edge devices that are listed in an invalid serial number file will not be able to authenticate and authorize with the vManage device.

Example:

Upload a valid serial number file

curl --insecure -F "file=@{{ serial_number_file }}" -F "validity=valid" -F "upload=true" --cookie "{{ viptela_api_cookie }}" https://{{ vmanage_ip }}/dataservice/system/device/fileupload

Upload an invalid serial number file

curl --insecure -F "file=@{{ serial_number_file }}" -F "validity=invalid" -F "upload=true" --cookie "{{ viptela_api_cookie }}" https://{{ vmanage_ip }}/dataservice/system/device/fileupload

In the first example, the curl command uploads a valid serial number file to the vManage device. This will allow the vManage device to authenticate and authorize WAN Edge devices that are listed in the serial number file and in the second example, the curl command uploads an invalid serial number file to the vManage device. This will prevent the vManage device from authenticating and authorizing WAN Edge devices that are listed in the serial number file.

Source - https://github.com/CiscoDevNet/python-viptela

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

You can also do a capture in developer tools from the UI, this has helped me figure out payloads and what is mean to be sent. For example. From the Cisco SD-WAN Manager menu, choose Configuration > Devices > WAN Edge List, upload the router authorized serial number file. However if this API does not work, it is then best to open a TAC case.

Hope this helps.

Screenshot 2023-11-01 at 15.14.38.pngScreenshot 2023-11-01 at 15.15.15.png

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

urozman
Level 1
Level 1

Thank you very much for yu+our help!