cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
809
Views
1
Helpful
5
Replies

SDWAN REST API to add controllers (Vbond/Vsmart) in vmanage

harshadpatil
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

Dan Frey
Cisco Employee
Cisco Employee

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)

 

View solution in original post

5 Replies 5

This might help https://github.com/CiscoDevNet/sd-wan-ansible-pipeline-code

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

Dan Frey
Cisco Employee
Cisco Employee

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)

 

Which specific URL is it?

Hi,

in general what is the logic for payload? I mean, how to prepare it for successful POST requests.

 

HTH,
Please rate and mark as an accepted solution if you have found any of the information provided useful.

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. 

Admin settings.png

Thanks for help.