Google数据存储返回“503后端错误” [英] Google Datastore returning "503 Backend Error"

查看:226
本文介绍了Google数据存储返回“503后端错误”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过PHP客户端向Google Datastore API发送以下请求,并且在没有任何其他信息的情况下收到503后端错误。我尝试了在线客户端此处提供,但错误是一样的。我的要求可能有错误吗?文档不是很有用:

  {
mode:NON_TRANSACTIONAL,
突变:{
upsert:[
{
key:{
path:[
{
kind:记录
}
]
},
properties:{
event:{
indexed:false,
stringValue:new_order
},
dataType:{
索引:false,
stringValue:test
}




$ b code


$ b <任何关于什么可能导致这种行为的想法?或者如何从API中获得更详细的反馈?

解决方案当您执行 POST时https:// www.googleapis.com/datastore/<APIversion>/datasets/<datasetId>/commit ,请确保您使用旧的管理控制台,表明您的URL中的datasetId是App Engine应用程序ID,并且如果您使用开发者控制台,您的datasetId是您在开发者控制台中看到的项目ID。



另外,如果您是通过新开发人员控制台创建项目的,请尝试打开和关闭API。

最后,检查您是否正确完成OAuth流程,所有客户端ID信息很有意义,并且您正在设置合适的范围等。

I'm sending the following request to the Google Datastore API, via the PHP client, and i'm getting a "503 Backend Error" without any other information. I tried the online client available here, but the error is the same. Maybe something is malformed on my request? The documentation wasn't very helpful:

    {
      "mode": "NON_TRANSACTIONAL",
      "mutation": {
        "upsert": [
          {
            "key": {
              "path": [
                {
                  "kind": "Log"
                }
              ]
            },
            "properties": {
              "event": {
                "indexed": false,
                "stringValue": "new_order"
              },
              "dataType": {
                "indexed": false,
                "stringValue": "test"
              }
            }
          }
        ]
      }
    }

Any ideas of what might be causing this behavior? Or how to enable more detailed feedback from the API?

解决方案

When you perform POST https://www.googleapis.com/datastore/<APIversion>/datasets/<datasetId>/commit, make sure that if you created your project using the old Admin Console that your datasetId in the URL is the App Engine application ID, and that if you created your project using the Developer Console, that your datasetId is the project ID you see in the Developer Console.

Also, if you created your project through the new Developer Console, try toggling the API on and off.

Finally, check that you are completing the OAuth flow properly, all your client ID info makes sense, and that you are setting up the right scopes, etc...

这篇关于Google数据存储返回“503后端错误”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆