Cisco Cisco Prime Network Services Controller 3.0 Guía Del Desarrollador
Page 20
OL-28369-01
Common API Methods and Conventions
The following sections identify common Prime Network Services Controller API methods, describe API
conventions, and provide example requests and responses:
conventions, and provide example requests and responses:
●
●
Methods and Filters
The following topics describe the methods and filters that Prime Network Services Controller uses:
●
●
●
●
●
Authentication Methods
Authentication allows API interaction with Prime Network Services Controller. It also provides a way to set
permissions and control the operations that can be performed.
permissions and control the operations that can be performed.
Note
A session cookie is a 47-character string; it is not the type of cookie that web browsers store locally to
maintain session information. Most code examples use <real_cookie> for an actual cookie such as
1217377205/85f7ff49-e4ec-42fc-9437-da77a1a2c4bf.
maintain session information. Most code examples use <real_cookie> for an actual cookie such as
1217377205/85f7ff49-e4ec-42fc-9437-da77a1a2c4bf.
The following topics describe authentication methods in more detail:
●
●
●
●
Login
The following code sample shows a login request using HTTPS to connect to Prime Network Services Controller,
and a Linux POST command to post authentication requests.
and a Linux POST command to post authentication requests.
POST https://10.193.34.70/xmlIM/mgmt-controller
Please enter content (application/x-www-form-urlencoded) to be POSTed:
<aaaLogin
Please enter content (application/x-www-form-urlencoded) to be POSTed:
<aaaLogin
inName="admin"
inPassword="Company@123"/>
inPassword="Company@123"/>
Note
The XML version and DOCTYPES are not included in aaaLogin and should not be used. The inName
and inPassword attributes are parameters.
and inPassword attributes are parameters.
Each XML API document represents an operation to be performed. When the request is received as an XML API
document, Prime Network Services Controller reads the request and performs the actions as provided in the
method. Prime Network Services Controller responds with a message in XML document format and indicates
success or failure of the request.
document, Prime Network Services Controller reads the request and performs the actions as provided in the
method. Prime Network Services Controller responds with a message in XML document format and indicates
success or failure of the request.
The following code sample shows a typical successful response for a login request.
<aaaLogin
response="yes"
outCookie="<real_cookie>"
outRefreshPeriod="600"
outPriv="admin,read-only"
outDomains="mgmt02-dummy"
outChannel="fullssl"
outCookie="<real_cookie>"
outRefreshPeriod="600"
outPriv="admin,read-only"
outDomains="mgmt02-dummy"
outChannel="fullssl"