Invoking REST
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 com.cisco.cnr.ws.xsd package. The HTTP primitives GET, POST, PUT, 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. Note the POST primitive with the application/x-www-urlencoded content-type requires that all form and request parameters be specified in the body of the request.
Client Sessions
Client access is controlled using basic HTTP authentication. This authentication scheme uses simple base-64 encoding of user credentials which should be secured via HTTPS. User authentication and authorization are controlled by the Network Registrar installation.
Client login is verified for each request, but if an active server session is present for the authenticated user, it will be reused. Otherwise an unauthorized error will be returned. The client may respond to this error by reissuing the request with the required user credentials, or choose to include its credentials with each request.
The session element can be used to manage the client connection.
Structure
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