If you recieve a 301 "Permanently Moved" error code while trying to call an API through the API Manager it is probably due to an error in the configuration of the API. The reverse proxy siting in front of the API Manager workers are configured to redirect all HTTP traffic to HTTPS. We need to make sure that the publisher is configured to accept HTTPS. Whether or not your API back-end accepts HTTPS, the API Manager should be configured to only accept HTTPS. Then the API Manager will call your back end through HTTP if necessary. The following steps will help you resolve the issue and update the API Manager correctly.

How to fix

  1. Check the URL that you are calling (and that the API Manager provides on the store) for https://. If the url uses http:// instead of https:// then the problem lies in the publisher.
    1. Note: If the URL you are using does start with https:// then this guide will not help resolve your issue. Please contact the the API Manager team for more help.
  2. Go the the API Publisher, find the API that is affected and open it.
  3. Click the edit button at the top of the page.
    1. Note: If the API effected is not your own please do not continue. Notify the API owner and point them to this article so that they can resolve the issue.
  4. Go to the third step of the publisher, "Manage"
  5. One of the options listed on this page is the "Transport Protocols". There are two options, http, and https. You should select only HTTPS.
    1. Note: This option only refers to the communication transport that should be used between the API Manager and the consumer. This option in no way affects the communication between WSO2 and your back-end service.
    2. Even if your API back-end is HTTP only, you must select HTTPS for this setting in the publisher. This will not affect the API Manager's communication with your back-end.
  6. Click "Save and Publish"
  7. Allow 15 minutes for your changes to propagate to the gateway workers.

Further Debugging

If these steps have not resolved your issue and after 15 minutes you are still receiving the same errors, please contact the the API Manager team (api@byu.edu).