[Contents] [Prev] [Next] [Index] [Report an Error]

Requesting All Configuration Objects of a Specified Type

To request complete information about all configuration objects of a specified type in a hierarchy level, a client application emits a <get-configuration> tag element that encloses the tag elements representing all levels of the configuration hierarchy from the root (represented by the <configuration> tag element) down to the immediate parent level for the object type. An empty tag represents the requested object type. The entire request is enclosed in an <rpc> tag element.

This type of request is useful when the object’s parent hierarchy level has child objects of multiple types and the application is requesting just one of the types. If the requested object is the only possible child type, then this type of request yields the same output as a request for the complete parent hierarchy (described in Requesting a Hierarchy Level or Container Object Without an Identifier).

<rpc>
<get-configuration>
<configuration>
<!- - opening tags for each parent of the object type - ->
<object-type/>
<!- - closing tags for each parent of the object type - ->
</configuration>
</get-configuration>
</rpc>

When the application requests JUNOS XML-tagged output (the default), the JUNOScript server returns the requested objects in <configuration> and <rpc-reply> tag elements. For information about the attributes in the opening <configuration> tag, see Requesting Information from the Committed or Candidate Configuration.

<rpc-reply xmlns:junos="URL">
<configuration attributes>
<!- - opening tags for each parent of the object type - ->
<first-object>
<!- - child tag elements for the first object - ->
</first-object>
<second-object>
<!- - child tag elements for the second object - ->
</second-object>
<!- - additional instances of the object - ->
<!- - closing tags for each parent of the object type - ->
</configuration>
</rpc-reply>

To specify the source of the output (candidate or active configuration) and request special formatting of the output (for example, formatted ASCII text or an indicator for identifiers), the application can include attributes in the opening <get-configuration> tag, its opening <junoscript> tag, or both. For more information, see Specifying the Source and Output Format of Configuration Information.

The application can also request additional configuration elements of the same or other types by including the appropriate tag elements in the same <get-configuration> tag element. For more information, see Requesting Multiple Configuration Elements Simultaneously.


[Contents] [Prev] [Next] [Index] [Report an Error]