To request information about a single configuration object, a client application emits the <get-configuration> tag element and encloses the tag elements that represent the entire statement path down to the object, starting with the <configuration> tag element. To represent the requested object, the application emits only the container tag element and identifier tag elements (each complete with the identifier value) for the object. It does not emit tag elements that represent other object characteristics. It encloses the entire request in an <rpc> tag element. In the following, the identifier tag element is called name:
<rpc>
<get-configuration>
<configuration>
<!- - opening tags for each parent of the object - ->
<object>
<name>identifier</name>
</object>
<!- - closing tags for each parent of the object - ->
</configuration>
</get-configuration>
</rpc>
When the application requests JUNOS XML-tagged output (the default), the JUNOScript server returns the requested object 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 - ->
<object>
<!- - child tag elements of the object - ->
</object>
<!- - closing tags for each parent of the object - ->
</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.
The following example shows how to request the contents of one multicasting scope called local, which is at the [edit routing-options multicast] hierarchy level. To specify the desired object, the client application emits the <name>local</name> identifier tag element as the innermost tag element. The output is from the candidate configuration and is tagged with JUNOS XML tag elements (the default).
