11-01-2023 03:40 AM
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!
11-01-2023 03:55 AM - edited 11-01-2023 03:56 AM
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"
}
11-01-2023 05:33 AM
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!
11-01-2023 07:54 AM
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
11-01-2023 08:20 AM
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.
11-02-2023 02:08 PM
Thank you very much for yu+our help!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide