Cisco Cisco Prime IP Express 8.3 Technical References

Page of 1286
Network Registrar REST API
The Network Registrar REST API provides access to a set of resources that can be managed by an
HTTP client. It is supported on the regional server and on local DHCP, DNS, and Caching DNS servers,
provided web services have been enabled.
Resources
 represent the set of managed Network Registrar classes. Supported classes are defined in
the nr.xsd XML schema file and its corresponding 
 package. The HTTP primitives
GET, PUT, POST, and DELETE are used for basic read, add, modify, and delete operations. Request
parameters are used to further qualify each request as applicable for each class.
Each resource is identified by its Network Registrar class name, which is case-sensitive. For example,
these URLs would be used to request the scope list and the scope test by name, respectively:
https://host:8888/web-services/rest/resource/Scope
https://host:8888/web-services/rest/resource/Scope/test
Because the URL uses the '/' character to denote the path, object names that include the '/' character
cannot be supported. For the CCMSubnet, Reservation6, and Lease6 classes, where an IP address that
may include a subnet mask serves as the object name, the '-' character should be used in place of the '/'
character. For example:
https://host:8888/web-services/rest/resource/Lease6/fe80::-64
https://host:8888/web-services/rest/resource/CCMSubnet/10.0.0.0-24
Data Representations
XML and JSON media types are supported for request input and response output. While all object
properties (Network Registrar object attributes) are presented in string form for these formats, any
property may represent a 
, an embedded object, or a list containing a set
of scalar values or embedded objects. Refer to the schema or Java class definition for a detailed
description of each property. All required properties are defined in the POST method summary for the
class.
Below are sample JSON and XML representations of the Scope b1. The objectOidnamepolicyvpnId,
and subnet properties are examples of scalar values. All values are entered as quoted string values, but
objectOid must be formatted as an 8-octect value as shown, subnet must represent a valid IPv4 address
and mask, and vpnId must be a 32-bit integer value. selectionTagList is an example of a list of scalar
values. Again all values must be entered as quoted strings. In addition, the stringItem label must be
included with the list entries as shown. Note the stringItem label applies for ALL scalar types, even
though these might represent integers, IP addresses, or DNS names. rangeList is a list of embedded
Range objects. Note the RangeItem label is used to identify the items in the list. Finally,
embeddedPolicy is an example of an embedded object. The objectList property in this object is a list of
embedded Option objects identified by the OptionItem label. Note option values must be specified in
AT_BLOB (hexidecimal) format.
JSON-formatted Scope Object