Reputation: 29
Does anyone know how to use WSO2 api manager to specify mandatory parameter through URL pattern. for example, I have a API which will be registered in WSO2 api manager , and its uri is '/abc/search/?a="xx"&b="yy"', currently both of these 2 query parameters (a & b) are optional. now I want to make 'a' as a mandatory one, but I don't want to change API logic, is there anyway to resolve it by using wso2 api manager?
in the URL pattern, I tried '/{a}', '/?a={a}' and /{?a} before, but all of them did not work
Upvotes: 0
Views: 1167
Reputation: 9702
From the APImanager we use URLmapping. What you can do is, open the API configurtaion, which can be found in the AM_HOME\repository\deployment\server\synapse-configs\default\api folder and edit the url-mapping part with url template.
eg:
url-mapping="/*"
uri-template="/{string1}/{string2}"
Upvotes: 1