I am developing an App Engine application and plan to provide an API as well. I would like to separate this API from the main site, so I am trying to use the "modules" function to separate both applications. The main site will be the default module, and the API will be in the api module. However, I have problems with this.
Right now, my main application YAML file is as follows:
application: my-app module: default runtime: python27 api_version: 1 ... handlers:
And a YAML API module file, for example:
application: my-app module: api runtime: python27 api_version: 1 handlers:
On the development server, the application is served on port 8000 and the API on port 7998.
In this configuration, my API does not work. Whenever I try to access it using localhost: 7998 / _ah / api / explorer, I get no result. If I try to start the API request manually, I get the following error: {"error": {"message": "BackendService.getApiConfigs Error"}} .
Which is strange, I also see the following lines in the development server logs:
INFO 2014-06-15 18:00:32,368 module.py:639] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 500 - INFO 2014-06-15 18:00:32,368 module.py:639] api: "GET /_ah/api/my-app/v1/events HTTP/1.1" 500 60
It seems that the API module is trying to pass the POST data to the default module (as can be seen from the first line of the logs).
Currently, the only workaround I have found is to add the same handlers for /_ah/spi/.* to the default YAML file, but in this situation, the separation between the main application and the API is inefficient.
Can someone tell me if the configuration I'm trying to achieve is Cloud Endpoints? Thank you very much!