Reputation: 29
I have created an API using WSO2 EI that looks like https://localhost:8243/services/ABC
.
Then I want to create another API that gets above API as the endpoint in order to add authentication. So how can I pass value to URL pattern and endpoint to get that?
When URL pattern is /xyz, and the endpoint is https://localhost:8243/services/ABC
. It points to https://localhost:8243/services/ABC/
xyz that not my endpoint.
Thank you so much!
Upvotes: 0
Views: 62
Reputation: 4001
You can attach a custom sequence to the API.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="header_sequence">
<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
</sequence>
This drops the resources and not appending to the path.
Upvotes: 2
Reputation: 125
As per my understanding, you are trying to invoke the backend https://localhost:8243/services/ABC
via the API created in APIM. You can try out the following to achieve it,
In the API created in APIM, you can simply add the URL https://localhost:8243/services
as the endpoint and then create a resource path as /ABC
.
Upvotes: 1