messages and the JSON or XML documents that contain
the API methods or managed object (MO) attributes.
Whenever information is retrieved and displayed, it is
read through the REST API, and whenever configuration
changes are made, they are written through the REST
API. The REST API also provides a way of subscribing to
push-based event notification, so that when a change
occurs in the MIT, an event can be sent through a web
socket.
The generic APIC REST API URI looks as follows:
https://APIC_Host:port/api/{mo|class}/{dn|clas
sname}.{xml|json}?[options]
Since the REST API matches one to one the MIT,
defining the URI to access a certain resource is
important. First, you need to define the protocol (http or
https) and the hostname or IP address of the APIC
instance. Next, /api indicates that the API is invoked.
After that, the next part of the URI specifies whether the
operation will be for an MO or a class. The next
component defines either the fully qualified domain
name for MO-based queries or the class name for class-
based queries. The final mandatory part of the request is
the encoding format, which can be either XML or JSON.
(The APIC ignores Content-Type and other headers, so
the method just explained is the only one accepted.) The
complete Cisco ACI REST API documentation with
information on how to use the API, all of the API
endpoints, and operations available can be found at
https://developer.cisco.com/docs/aci/.
APIC REST API username- and password-based
authentication uses a special URI, including aaaLogin,
aaaLogout, and aaaRefresh as the DN targets of a POST