January 2015
Intermediate to advanced
198 pages
4h 27m
English
As we already mentioned, our REST API will be integrated with the existing App Engine application without altering its behavior, so we need to specify a new WSGI application that will handle the URLs we map to the API endpoints. Let's start with the app.yaml file, where we add the following code:
handlers: - url: /static static_dir: static - url: /_ah/spi/.* script: notes_api.app - url: .* script: main.app libraries: - name: webapp2 version: "2.5.2" - name: jinja2 version: latest - name: endpoints version: 1.0
The regular expression that matches API URLs is actually /_ah/spi/.*. Even if we perform requests to an URL such as https://example.com/_ah/api/v1/an-endpoint, Cloud Endpoints will take care of the proper redirects. ...
Read now
Unlock full access