URI structure

The URI path conveys a resource model that is similar to the YANG model, with each forward slash-separated path segment corresponding to a unique resource within the model's hierarchy (using the following syntax: <base_URI>/path1/path2/{key1},{key2}/path3/...).

For example, the URI "/rest/config/running/interface/ethernet" identifies the collection of Ethernet interfaces as target resources. In this example, from the path element..../interface onwards it represents the YANG model.

Similarly, the URI "/rest/config/running/interface/Port-channel/101" identifies the interface resource containing the Port-channel name101.

URI encoding

Base URI

The base URI (http://host:port/rest/) is the entry point to access and manage all the resources defined in the system. The port is the default HTTP port (80). It is used to identify the base resource, and retrieves its first-level child resources of the base resource.

Note

Note

A leaf attribute can also be present in the URI to identify the exact resource. For example, the URI http://host:port/rest/config/running/interface/port-channel/<po-id>/switch-port is used to identify the switch-port resource of the port-channel.

Top-level URIs

The URI identifies its first-level resource in its hierarchy with the given media type in its request; as shown in the following examples: