Руководство Разработчика для Cisco Cisco Prime Network Services Controller 3.0

Скачать
Страница из 103
Page 30 
OL-28369-01 
API Examples 
The following sections provide API configuration and management examples: 
● 
● 
● 
● 
The following sections demonstrate how configConfMos is used to create, modify, or delete an MO (or object). In 
each example where the configConfMos API uses a single XML element <pair> to specify a single configuration 
object, you can use the configConfMo API to obtain the same result. 
Authentication Using the Management Controller 
Access to Prime Network Services Controller is session-based and must first be authenticated with a login request. 
Default session lengths are 120 minutes. Sessions can be extended with the aaaKeepAlive and aaaRefresh 
methods. We recommend, when activity is completed, that the user manually log out of the session using 
aaaLogout. 
Use service type mgmt-controller to send login requests to Prime Network Services Controller. 
The following topics provide examples of authentication requests and responses: 
● 
● 
Authentication Request 
The following example shows an authentication request: 
POST URL: https://10.193.33.221/xmlIM/mgmt-controller 
XML API payload: 
<aaaLogin 
inName="admin" 
inPassword="Nbv12345"/> 
Authentication Response 
The following example shows an authentication response: 
<aaaLogin 
cookie="" 
commCookie="" 
srcExtSys="0.0.0.0" 
destExtSys="0.0.0.0" 
srcSvc="" destSvc="" 
response="yes" 
outCookie="<real_cookie>" 
outRefreshPeriod="600" 
outPriv="admin,read-only" 
outDomains="" 
outChannel="fullssl" 
outEvtChannel="fullssl" 
outSessionId="web_13528" 
outVersion="1.0"> 
</aaaLogin>