Wildcard character support
When you use the GET method, the URI can contain the asterisk (*
) wildcard character instead of a component in URI path. You can use wildcard characters in multiple places in the path. You cannot use a wildcard character as part of the query string.
The wildcard character must replace the entire component in the path. For example, you can use a wildcard to specify all VRFs, but you cannot use a wildcard character to specify all VRFs that begin with the letter
r
.
By using a wildcard character in place of a component in the path, you can specify that GET return information about multiple resources without requiring you to name each resource instance or to execute multiple GET requests.
For example:
The following URI specifies all routes regardless of VRF:
"https://192.0.2.5/rest/v1/system/vrfs/*/routes"
The following URI specifies all ACL entries of type IPv4, regardless of the name of the ACL:
"https://192.0.2.5/rest/v1/acls/*/ipv4/cfg_aces"
The following URI specifies the connection state of all BGP neighbors belonging to all BGP routers in the "red" VRF:
"https://192.0.2.5/rest/v1/system/vrfs/red/bgp_routers/*/bgp_neighbors/*?attributes=conn_state"