Help Center>
API Gateway>
FAQs>
API Calling>
What Should I Do If "The API does not exist or has not been published in the environment." Is Displayed?
Updated on 2023-08-04 GMT+08:00
What Should I Do If "The API does not exist or has not been published in the environment." Is Displayed?
If an open API in APIG failed to be called, troubleshoot the failure by performing the following operations:
- The domain name, request method, or path used for calling the API is incorrect.
- For example, an API created using the POST method is called with GET.
- Missing a slash (/) in the access URL will lead to a failure in matching the URL in the API details. For example, URLs http://7383ea59c0cd49a2b61d0fd1d351a619.apigw.region.cloud.com/test/ and http://7383ea59c0cd49a2b61d0fd1d351a619.apigw.region.cloud.com/test represent two different APIs.
- The API has not been published. APIs can be called only after they have been published in an environment. For details, see Publishing an API. If the API has been published in a non-production environment, check whether the X-Stage header in the request is the name of the environment.
- The domain name is resolved incorrectly. If the domain name, request method, and path for calling the API are correct and the API has been published in an environment, the API may not be correctly resolved to the group to which the API belongs. For example, if you have multiple API groups and each group has an independent domain name, the API may be called using the independent domain name of another group. Ensure that the API is being called using the correct domain name.
- Check whether the API allows OPTIONS cross-region requests. If yes, enable cross-origin resource sharing (CORS) for the API, and create an API that uses the OPTIONS method. For details, see CORS.
Parent topic: API Calling
API Calling FAQs
- What Are the Possible Causes for an API Calling Failure?
- What Should I Do If an Error Code Is Returned During API Calling?
- Why Am I Seeing the Error Message "414 Request URI too large" When I Call an API?
- What Should I Do If "The API does not exist or has not been published in the environment." Is Displayed?
- Why Am I Seeing the Message "No backend available"?
- What Are the Possible Causes If the Message "Backend unavailable" or "Backend timeout" Is Displayed?
- Why Am I Seeing the Message "Backend domain name resolution failed" When a Backend Service Is Called?
- Why Doesn't Modification of the backend_timeout Parameter Take Effect?
- How Do I Switch the Environment for API Calling?
- What Is the Maximum Size of an API Request Package?
- How Do I Perform App Authentication in iOS System?
- Why Can't I Create a Header Parameter Named x-auth-token for an API Called Through IAM Authentication?
- App (Credential) FAQs
- Can Mobile Apps Call APIs?
- Can Applications Deployed in a VPC Call APIs?
- Does APIG Support WebSocket Data Transmission?
- Does APIG Support Persistent Connections?
- How Will the Requests for an API with Multiple Backend Policies Be Matched and Executed?
- Is There a Limit on the Size of the Response to an API Request?
- How Can I Access Backend Services over Public Networks Through APIG?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore