Special characters in Gateway

Hi,

Does API Gateway support special characters, ’ " ( ), in path?.
swagger resource: /sample/v1/resource/path(‘{variable}’).

I always get the error 404 resource not found. I have checked if the API is enabled and it is. I already have check the spelling. was thinking that it maybe because of the special characters.

Thanks.

Hello,

Could you please try using appropriate url encoding while creating API on Gateway?

Thanks,
Shiv

yes, I have already tried “%28, %27 and %29” but still it is giving the error 404

Can you please provide the API ? Is it hosted on Integration Server?

Thanks

I’m not sure i am if I am allowed.
but everything seems normal with the Swagger, except that it has those special characters in the path.

When it was imported to the API Gateway it was successful. but when it was activated and then called I always get 404.

I have already tried this: /sample/v1/resource/path%28%27{variable}%27%29 and no success.

Hi Mark,

It’s working for the url http://sag-2hkymh2:5555/gateway/PetStore%20on%20Heroku/1.0.0/sample/v1/resource/path(‘{variable}’)

It won’t work when replace the alias ‘variable’ with some value say http://sag-2hkymh2:5555/gateway/PetStore%20on%20Heroku/1.0.0/sample/v1/resource/path(‘{aliasValue}’)
It’s incorrect usage of alias in the resource.

Please have a look at the usage of path parameter in the resource.

Thanks,
Mohammed

Hi Mohammed,

So you mean it would only work it the variable is not dynamic? so %28%27fixed%27%29?

Exactly Mark.

Thanks,
Mohammed

Hi Mark,

Currently, we don’t support partial substitution in the path variable. It would be good to have the path param /{pathparam} so that resource looks like /sample/v1/resource/{pathparam} and do the URL encoding of path param before invoking the request.

Sample request /sample/v1/resource/path%28%27value1%27%29
Sample request /sample/v1/resource/path%28%27value2%27%29

Thanks & Regards
Lakshmanan N

Hi Lakshmanan N,

I was able to make /sample/v1/resource/path{value} work. but it seems not to match with the original swagger case that we configured.

so it would mean adding the %28%27 %27%29 to the request as part of the variable. the sample request /sample/v1/resource/path%28%27anyvalue%27%29.

thanks,
Mark