Help Center/
ROMA Connect/
Troubleshooting/
Service Integration/
Error Message "The API does not exist or has not been published in an environment" Is Displayed When an API Is Called Using JavaScript
Updated on 2022-12-01 GMT+08:00
Error Message "The API does not exist or has not been published in an environment" Is Displayed When an API Is Called Using JavaScript
Cause Analysis
The possible causes are as follows:
- The API is not published in an environment.
- The URL to be accessed is different from that in the API details.
- The API uses the OPTIONS method for cross-domain requests. However, CORS is not enabled and OPTIONS is not selected for Method during API creation.
Solution
- Publish the API in an environment.
- Modify the URL to ensure that the URL is the same as that in the API details. If a slash (/) is missing after the URL, the API cannot be matched.
Example: http://example.com/test/ and http://example.com/test match different APIs.
- Enable CORS and select OPTIONS for Method when creating the API.
Parent topic: Service Integration
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.
Chatbot