API Gateway

58 views
Skip to first unread message

Kesava Rao Anumolu

unread,
Feb 5, 2022, 4:24:00 PM2/5/22
to Google Cloud Endpoints
Hi,
We are having multiple backend app engine services and we are securing them by using a single API gateway. At this point of instant, we are facing an issue. The issue is:
So, we are assigning each individual service URL in x-google-backend at path or operation level. Then we are getting an error of 404 or 405 when we try to hit from our client app.

Screenshot 2022-02-05 121755.png

Screenshot 2022-02-05 124000.png


But, when we move the x-google-backend extension to 'top level', it's working fine. That means for each and every backend service we need to define a separate config file and a separate gateway, which is not what we are expected of.

Is there any workaround solution, like by defining multiple open API configs for a single API gateway or path level changes or something else?  It will be so helpful if anyone can advise us on this issue.

thanks in advance, kesava.

Hans Ravnaas

unread,
Feb 5, 2022, 6:34:45 PM2/5/22
to Kesava Rao Anumolu, Google Cloud Endpoints
Kesava,

Make sure you include the basePath in your URL as well, so for example:


BTW, I normally don't include the "attachment" part in the x-google-backend value, but instead include this under x-google-backend:

path_translation: APPEND_PATH_TO_ADDRESS

That'll make the gateway append the path and query string parameters onto the backend URL. That works well if you for example have many different paths and you don't want to specify each one in the config here.

Hans

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/5f9926f4-4fb5-4903-9a1e-ea4e1954e805n%40googlegroups.com.


--
Company logo
Hans Ravnaas
Linkedin  Facebook  Twitter  -

What the C-suit doesnt know

Kesava Rao Anumolu

unread,
Feb 7, 2022, 1:06:02 AM2/7/22
to Google Cloud Endpoints
Hi Hans,

Ya, it's working.  Thank you so much.

Kesava.

Reply all
Reply to author
Forward
0 new messages