DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

operation. The payloads contain a simple XML or JSON
document containing the MO representation of an
aaaUser object. The following examples use the Cisco
DevNet always-on APIC instance available at
https://sandboxapicdc.cisco.com with a username value
of admin and a password of ciscopsdt to show how to
interact with an ACI fabric using the APIC REST API
interface. Using curl, the authentication API call should
look as shown in Example 9-1.


Example 9-1 curl Command for Cisco APIC
Authentication


Click here to view code image


curl -k -X POST \
https://sandboxapicdc.cisco.com/api/aaaLogin.json
\
-d '{
"aaaUser" : {
"attributes" : {
"name" : "admin",
"pwd" : "ciscopsdt"
}
}
}'

The returned information from the APIC should look as
shown in Example 9-2.


Example 9-2 Cisco APIC Authentication Response

Click here to view code image


{
"totalCount" : "1",
"imdata" : [
{
"aaaLogin" : {
"attributes" : {
"remoteUser" : "false",
"firstLoginTime" : "1572128727",
"version" : "4.1(1k)",
"buildTime" : "Mon May 13
16:27:03 PDT 2019",
Free download pdf