Google Datastore returning “503 Backend Error”

让人想犯罪 __ 提交于 2019-12-25 03:59:17

问题


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?


回答1:


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...



来源:https://stackoverflow.com/questions/25855510/google-datastore-returning-503-backend-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!