Hi Filipe,
Your $contains function looks fine. Perhaps you could provide your entire switch function for analysis. Your request.path starts with your API base path, so I'd assume one of your paths does have the string xpto, otherwise, please confirm the version of the switch policy that you're using. Do you have access to the DataPower appliance? If so, place the logging level at debug and see if there are any logs associated with the switch policy.
Best Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------