04-12-2023 05:45 AM
Hi,
We are trying automate SDWAN deployment on ESXI host using REST API available on apidocs. However, we are not able to locate correct API which we can use to add controllers in vmanage.
We tried to use API system/device API path with POST request to add controllers but getting errors. not sure if we are using right payload since there is no example available in apidocs of vmanage.
Please help.
Solved! Go to Solution.
04-12-2023 12:10 PM
Here is a sample payload to add vbond or vsmart with vManage API. IP is VPN0 address for vbond or vsmart. TYPE is either vbond or vsmart.
payload = '{"deviceIP":"%s","username":"admin","password":"admin","personality":"%s","generateCSR":false}' % (IP, TYPE)
login_action = '/dataservice/system/device'
url = login_url + login_action
headers = {'Content-Type' : 'application/json', 'Accept' : 'application/json', 'X-XSRF-TOKEN' : csrf }
response = s.post(url, data=payload, headers=headers, verify=False, allow_redirects=False)
04-12-2023 08:27 AM
This might help https://github.com/CiscoDevNet/sd-wan-ansible-pipeline-code
04-12-2023 12:10 PM
Here is a sample payload to add vbond or vsmart with vManage API. IP is VPN0 address for vbond or vsmart. TYPE is either vbond or vsmart.
payload = '{"deviceIP":"%s","username":"admin","password":"admin","personality":"%s","generateCSR":false}' % (IP, TYPE)
login_action = '/dataservice/system/device'
url = login_url + login_action
headers = {'Content-Type' : 'application/json', 'Accept' : 'application/json', 'X-XSRF-TOKEN' : csrf }
response = s.post(url, data=payload, headers=headers, verify=False, allow_redirects=False)
04-12-2023 05:04 PM
Which specific URL is it?
04-12-2023 10:15 PM
Hi,
in general what is the logic for payload? I mean, how to prepare it for successful POST requests.
04-13-2023 04:16 AM
This perfectly worked for us. Thank you.
Now our next challenge is to configure Administration settings using API to configure org name, Vbond etc. However, we are not able find correct REST API from apidocs. we tried using 'settings/configuration/{setting type}' API but had no luck. Also we wonder if we use right setting type here.
Moreover we are trying to find REST API to upload vedge serial no(.viptela file) list on vmanage.
Thanks for 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