'$' character in query parameter name

I see that the entire query string is url encoded when the request is received in the API proxy and sent to the target in Apigee.

Is there a way to override this behaviour to only encode the query parameter values and not the queryparameter names?

The url used for the call(tried from postman) is https://dev1-api.*****.com/cemapi/client/sellers/get?$filter=ClientCodeId%20eq%20%27313333%27&$top=40

In the API proxy this is seen as:

GET https://dev1-api.*****.com/cemapi/client/sellers/get?%24filter=ClientCodeId%20eq%20%27313333%27&%24t...

Here is what I have tried:

used javascript policy to decode request.querystring; loop through each query parameter and set the decoded name and decoded values again in request.queryparam.<<name>>

However, this doesnt seem to help. I still see that the queryparam name is encoded when the request is sent to the target server.

Is there a way to set the queryparam name as is(decoded value) and only encode the values?

Solved Solved
1 2 442
1 ACCEPTED SOLUTION

$ is a reserved character hence it's encoded

You can refer to the RFC

https://datatracker.ietf.org/doc/html/rfc3986

View solution in original post

2 REPLIES 2

$ is a reserved character hence it's encoded

You can refer to the RFC

https://datatracker.ietf.org/doc/html/rfc3986

encoding cannot be stopped in the url. What you can do is in Apigee proxy endpoint using javascript/python replace the %24 with the $ symbol in querystring and send the same to backend.