cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Filters dynamically for the OData Service in API Management

0 Kudos

Hi Guys - I am trying to consume the back end oData service via API Management.

I have to pass the Filters to the oData service based on the inputs received at the API Management.

I am using the API Provider for Connecting to back end system which is via Cloud Connector.

I tried to add the filters to the URI using the target. basepath option, but I don't see the filter getting passed to the backend service.

As the back end service is being called from Cloud Connector, I am unable to call the service dynamically also by setting the URL (target.url).

So any idea how I can achieve this at API Management?

Thanks & Regards

Rajesh

Accepted Solutions (0)

Answers (1)

Answers (1)

ElijahM
Advisor
Advisor
0 Kudos

Hi Rajesh,

It looks like you are using the "OnPremise" option in the API Provider, to connect through Cloud Connector. The "target.url" variable is only available when an URL (no API provider) is used with the API proxy.Whenever an API provider is associated to the API proxy the "target.url" is unavailable.

To achieve the same you can use a variable in the URL field after associating the API provider to the API proxy (e.g. enter {value} in path). Then you can update the value of the variable using an policy e.g. Assign message or java script policy.

I hope this helps.

Regards,
Elijah