Define the URI Space

When you define a URI space, segments are separated with a / and the wildcard characters * and ** are used to represent multiple characters or segments.

Supported URI segment types

Segment type Description Represented by... Examples
Static Specific name that must match exactly. Plain text  
AnySegment Specifies one segment that can contain any value. *

/my/* will match:




AnyTree Specifies one or more segments that can contain any value. **

/my/** will match:




Note: You can configure Service Virtualization to distinguish between URIs that differ by a trailing slash only. For details, see the REST section on the Service Properties Page.

Back to top


Each time an incoming message from a client passes through Service Virtualization, the URI in the request is evaluated as follows:

A Static segment is always evaluated first. If there is no match, AnySegment is then evaluated. Finally, if there is no viable Static or AnySegment, the AnyTree segment is evaluated.

Back to top

Examples - URI spaces

URI Space that you define in the service description of the virtual service

Incoming client request ® The matching URI Space in the virtual service

Example 1:



  • /credit-cards/accounts/my/rewards/are/big ® /credit-cards/accounts/*/rewards/*/big
  • /credit-cards/accounts/your/rewards/arent/small ® /credit-cards/accounts/*/rewards/*/small

Example 2:




  • /credit-cards/accounts/1/rewards ® /credit-cards/accounts/**/rewards
  • /credit-cards/accounts/1/2/rewards ® /credit-cards/accounts/*/*/rewards
  • /credit-cards/accounts/1/2/3/rewards ® /credit-cards/accounts/*/**/rewards

Example 3:







  • /credit-cards/accounts/your/rewards ® /credit-cards/accounts/*/rewards
  • /credit-cards/accounts/12222/transactions ® /credit-cards/accounts/*/transactions
  • /credit-cards/accounts/187/transactions/985/adjustment-decisions ® /credit-cards/accounts/*/transactions/*/adjustment-decisions
  • /credit-cards/accounts/something/really/ugly ® /credit-cards/accounts/**/
  • /credit-cards/accounts/something/really/ugly/with/transactions ® /credit-cards/accounts/**/transactions
  • /credit-cards/accounts ® /credit-cards/accounts


  • While the following two endpoints are equal in their meaning, the method that Service Virtualization uses to evaluate priority means that */** has higher priority than **/*. Using the first construction (**/*) would significantly affect performance, and is not recommended.



  • The expression **/** can be used in a URI Space, but it widens the search scan and is not recommended for performance reasons.
  • The same set of URI masks added to a URI Space will always have identical results, regardless of the order they are listed.

Back to top

See also: