Service is Temporary Unavailable Error - Reverse Proxy

Not applicable

I have setup a Reverse Proxy with a target endpoint to an external URL and secured the Proxy with an API Key. However, when testing the Proxy with the newly generated API key, I get a "Service is Temporary Unavailable" error message.

HTTP Request:

http://XXXXXX-test.apigee.net/v1/basemapspositron?apikey=XXXXXXXX

I was able to successfully implement the sample application "helloworldapikey" without this issue.

0 5 296
5 REPLIES 5

Hi @Michelle Chandra -- Welcome to Apigee Community!

Could there be a problem with the backend target service? What happens when you call your target service directly (not through the proxy?). Does it succeed? You can try starting the Trace session for your proxy -- that will show you if the request went to your target, and also the return response from the target.

If you can't get it to work otherwise, here's another similar post I found where additional troubleshooting was required.

Will

Dear @Michelle Chandra -- Welcome to Apigee Community

You got invalid target URL in your "basemapspositron" proxy. Seems like target url you are using "http://{s}.basemaps.cartocdn.com/light_all/" is a raw template url. Notice the {} in the URL. You need to find the right target URL for your API with values filled in instead of the raw tempate url.

I have found this thread which says, template variables in URL is actually filled in automatically by the mapping libraries you choose. Since we are not using any libraries in API Proxy, make sure you provide the URL with template values filled in as target url.

For Example, Check this target URL,

http://a.basemaps.cartocdn.com/light_all/3/1/1.png

You can also find more about, How to set dynamic target URL in Apigee here.

Hope it helps. Keep us posted if any.

@Michelle Chandra , On a separate note, Please do not share confidential information like org name / security keys in public community. It will lead to security issues in future. Please always mask the information before you share same in public community. I have updated your question to remove sensitive information.

Not applicable

Thank you for the answers, I am indeed using the incorrect URL for the target endpoint. What is the best way to edit the target endpoint of the existing API Proxy? I am having trouble understanding where from the GUI I can edit the target endpoint, will I need to edit the URL from the develop tab or can I edit it somewhere else?

Thank you so much!

You can edit the target URL like this:

1. Go to the Develop tab.

2. In the left-hand Nav area, under Target Endpoints, click "default" (assuming that's the name of your target endpoint).

3. In the editor, you can edit the target URL by editing the URL in the HTTPTargetConnection element. Replace what's there with the correct URL.

<HTTPTargetConnection>
   <Properties/>
   <URL>http://mocktarget.apigee.net</URL>
</HTTPTargetConnection>