Virtual Endpoint path related

We have a use case to handle call-back methods from browsers. Basically, these callbacks methods are not tied to any specific listen path ( or API). Once it hits Tyk, this needs to be rerouted to different microservices/upstreams based on query parameter values ( which is encoded and is json object- for routing we just need to use on of the attribute in the json object).
So we are planning to use a virtual end point for this.
Q#1. Can the javascript in virtual endpoint supports decode of a base64 encoded string?
Q#2: How doest the URL looks like for a virtual end point- like if I am defining the virtual end point in API definition with listen path as say “acme” and virtual end point resource as “browser/callback” - Does the whole URL looks like /acme/browser/callback OR just browser/callback?
As per Tyk document its not clear and seems like its browser/callback " * path: This is the relative URI path to which the virtual middleware will respond. For example, http://{YOUR-DOMAIN}/call-serverless."

Any help with this query, please

Hello @sp.padmanabhan and welcome to the community.

Yes, it does. The Virtual Endpoint uses the same API as the JavaScript Middleware API and supports b64dec and b64enc

The whole URL (listen_path plus the relative path) /acme/browser/callback. Hope this helps

1 Like