我正在尝试构建一个 Endpoints 应用程序,但我是 Google App Engine 的新手。
据我了解,SDK 中包含某种 API Explorer,它应该让我测试/验证我的 API——文档说:“通过导航到http://localhost:8080/_ah/api/explorer
”在 Google APIs Explorer 中测试 API 后端。但我找不到任何关于 API Explorer 实际是什么、做什么或看起来像什么的文档。
无论如何,当我尝试点击该 URL 时,我会立即被重定向到https://developers.google.com/apis-explorer/?base=http://localhost:8080/_ah/api#p/,其中没有告诉我任何有用的信息,而且似乎一定是某种错误。
devappserver 日志说:
INFO 2013-07-17 17:27:54,574 server.py:593] default: "GET /_ah/api/explorer HTTP/1.1" 302 -
INFO 2013-07-17 17:27:56,099 server.py:593] default: "GET /_ah/api/static/proxy.html?jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.7JUwNUXMAS8.O%2Fm%3D__features__%2Fam%3DEQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAItRSTO0dpKS_pssf5r3z87E6FlFvDGdOg HTTP/1.1" 200 1933
INFO 2013-07-17 17:27:56,193 server.py:593] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 200 2342
INFO 2013-07-17 17:27:56,492 server.py:593] default: "GET /_ah/api/discovery/v1/apis HTTP/1.1" 200 576
INFO 2013-07-17 17:27:56,507 server.py:593] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 200 2342
INFO 2013-07-17 17:27:56,583 server.py:593] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 200 2342
INFO 2013-07-17 17:27:56,811 server.py:593] default: "GET /_ah/api/discovery/v1/apis HTTP/1.1" 200 576
INFO 2013-07-17 17:27:56,886 server.py:593] default: "GET /_ah/api/discovery/v1/apis/scrnxSync/v1/rest HTTP/1.1" 200 3365
不管那值多少钱。
这是我的 app.yaml:
application: scrnx-cloud-1
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /admin/.*
script: admin.application
login: admin
secure: always
# Endpoints handler
- url: /_ah/spi/.*
script: sync_api.application
# catchall - must come last
- url: /.*
script: default.application
admin_console:
pages:
- name: View Measurement
url: /admin/measurement
libraries:
- name: jinja2
version: 2.6
- name: markupsafe
version: 0.15
builtins:
- admin_redirect: off
- appstats: off
- deferred: off
- remote_api: on
我还应该做些什么来设置它吗?