无法访问localhost上的API资源管理器

c r*_*ald 17 google-app-engine google-cloud-endpoints

我正在尝试构建一个Endpoints应用程序,但我是Google App Engine的新手.

根据我的理解,SDK中包含某种API Explorer,可以让我测试/验证我的API - 文档说:"通过导航到Google API Explorer中测试API后端http://localhost:8080/_ah/api/explorer".但是我找不到任何关于API Explorer实际上是,做什么或看起来像什么的文档.

在任何情况下,当我尝试点击该网址时,我会立即重定向到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
Run Code Online (Sandbox Code Playgroud)

无论那是什么价值.

这是我的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
Run Code Online (Sandbox Code Playgroud)

我应该做些什么来设置它吗?

Prz*_*ada 8

有些东西改变了,现在你必须以特定的方式启动Chrome才能在localhost开发服务器上使用api explorer

这是来自谷歌的信息的链接.

但对我来说,仍然没有使用api explorer与localhost dev服务器修复.
我发现可能的解决方法是启动带有"--allow-running-insecure-content"标志的Chrome
在终端上运行MacO:

/ Applications/Google\Chrome.app/Contents/Mac/Google\Chrome --user-data-dir = test --allow-running-insecure-content


A P*_*cha 7

如果您使用的是Chrome浏览器,只需在http中输入https即可.它对我有用.

http://apis-explorer.appspot.com/apis-explorer/?base=http://localhost:8080/_ah/api#p/


Sca*_*ami 4

API Explorer 的 URL 是正确的,但存在一些问题(显然尚未全部解决),API Explorer 无法正确列出您的 API。

与https://developers.google.com/apis-explorer/的外观相比,它是 Google API 的 API Explorer,它比您通常自己托管的 API 数量要多得多,但只是为了让您了解您要做什么应该会看到:单击 API 后,会看到 API 列表以及每个 API 的详细信息。

通常有效的解决方法是将 API 的名称和版本显式添加到 URL,因此由于您的 API 是通过scrnxSync版本调用的,因此v1此链接应该向您显示为 API 定义的方法,并允许您调用这些方法:

https://developers.google.com/apis-explorer/?base=http://localhost:8080/_ah/api#p/scrnxSync/v1/