2

我尝试使用 API 资源管理器(以及客户端库)通过将元数据对象作为标头键和值来更新对象的标头。

我只收到错误响应

{
error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid argument."
   }
  ],
  "code": 400,
  "message": "Invalid argument."
 }
}

请求是:

PATCH https://www.googleapis.com/storage/v1beta2/b/mbi-figure/o/infovilla_paypal.png?key={YOUR_API_KEY}

Content-Type:  application/json
Authorization:  Bearer ya29
X-JavaScript-User-Agent:  Google APIs Explorer

{
 "metadata": {
  "title": "Kyaw"
 }
}
4

1 回答 1

4

You've run into a bug with PATCH that is being worked on. Fortunately, there's a workaround. Adding a "projection=full" parameter to the URL should fix your problem.

于 2013-08-26T17:37:53.000 回答