Руководство Разработчика для Cisco Cisco Virtual Topology System 2.0

Скачать
Страница из 102
VTS 2.0 Developer Guide 
 
 
4.1   Authgroup 
The following APIs are used to create or retrieve the authentication groups 
for which the username and password that will be used to access the devices 
are stored. 
 
GET  
https://host:8888/api/running/devices/authgroup - to get list of authgroups. 
  
PATCH 
https://host:8888/api/running/devices/authgroup/  - to incrementally add 
the authgroup. 
 
4.1.1  Payload 
<authgroups> 
<group> 
<name>default_device</name> 
<umap> 
<local-­‐user>admin</local-­‐user><!-­‐-­‐Username used for NCS API 
authentication-­‐-­‐> 
<remote-­‐name>admin</remote-­‐name><!-­‐-­‐Username for Device 
authentication-­‐-­‐> 
<remote-­‐password>admin</remote-­‐password><!-­‐-­‐Password on 
Device for user account supplied-­‐-­‐> 
<remote-­‐secondary-­‐password>admin</remote-­‐secondary-­‐
password><!-­‐-­‐used for enable password-­‐-­‐> 
</umap> 
</group> 
</authgroups> 
 
4.2  Device  
The following APIs are used to do CRUD operation of the device. 
GET  
https://host:8888/api/running/devices/device  - to get list of devices 
  
PUT 
https://host:8888/api/running/devices/device/{device-name}  - to add device to 
VTS or replace a device 
  
PATCH 
https://host:8888/api/running/devices/device/  - to incrementally add the 
device ( Existing device will not be modified)