I am new to Python and Google AppEngine, but I had about 7 years of programming experience. I am also new to StackOverflow.
I’m trying to create a simple Google Cloud Endpoint API for my personal project, and also finish and upload the finished application to the Google App Engine.
Here are my endpoint API settings:
@endpoints.api(name='puzzle', version='v1', description='Puzzle Engine API')
And methods:
@endpoints.method( PuzzleMessage, PuzzleMessage, name='puzzle.generate', http_method='GET', path='generate' ) @endpoints.method( PuzzleMessage, PuzzleMessage, name='puzzle.solve', http_method='GET', path='solve' )
My app.yaml looks like this:
handlers: - url: /favicon\.ico static_files: favicon.ico upload: favicon\.ico - url: .* script: main.app # Endpoints handler - url: /_ah/api/.* script: services.application libraries: - name: webapp2 version: "2.5.2"
And finally, services.py reads:
from google.appengine.ext import endpoints from api import puzzle_api application = endpoints.api_server([ puzzle_api.PuzzleAPI ], restricted=False)
Now the problem is that when I try to reach https://my-app-name.appspot.com/_ah/api/discovery/v1/apis, all I see is
Not found
Also, when I am in the API API https://developers.google.com/apis-explorer/?base=https:// my-app-name.appspot.com/_ah/api#p/, the list Services is empty, and in the JavaScript console I see a 404 error at https://my-app-name.appspot.com/_ah/api/discovery/v1/apis.
Eliminating these URLs on the local test server gives completely different errors. When I try to get to the Discovery API on a local test server on localhost: 8080 / _ah / api / discovery / v1 / apis, I get
{"error": {"message": "BackendService.getApiConfigs Error"}}
instead of "Not Found." Tapping Explorer in https://developers.google.com/apis-explorer/?base=http://localhost:8080/_ah/api#p/ will now show a 500 error instead of 404 in the JavaScript console.
I am trying to solve this problem by doing a lot of Google searches and trying a lot, but I just can't go on. I would really appreciate any help I can get from this community of professionals.
Thanks.