无法通过框API列出作为协作者的组的成员身份

时间:2014-01-29 22:30:20

标签: box-api

我在尝试列出作为文件夹上的协作者的组的成员身份时收到错误。这是一个示例文件夹协作者请求 -

curl https://api.box.com/2.0/folders/1531887577/collaborations -H "Authorization: Bearer ACCESS_TOKEN"

响应 -

{
   "total_count":6,
   "entries":[
      {
         "type":"collaboration",
         "id":"25306820",
         "created_by":null,
         "created_at":"2012-09-06T09:48:20-07:00",
         "modified_at":"2013-10-19T09:37:14-07:00",
         "expires_at":null,
         "status":"accepted",
         "accessible_by":{
            "type":"user",
            "id":"184577095",
            "name":"Clayton C",
            "login":"clayc@xxxxxxx.com"
         },
         "role":"editor",
         "acknowledged_at":"2012-09-06T09:48:20-07:00",
         "item":{
            "type":"folder",
            "id":"379625555",
            "sequence_id":"7",
            "etag":"7",
            "name":"Business"
         }
      },
      .... more users ....,
      {
         "type":"collaboration",
         "id":"39809829",
         "created_by":null,
         "created_at":"2013-05-27T09:20:32-07:00",
         "modified_at":"2013-10-23T04:20:34-07:00",
         "expires_at":null,
         "status":"accepted",
         "accessible_by":{
            "type":"group",
            "id":"120995",
            "name":"IT"
         },
         "role":"editor",
         "acknowledged_at":"2013-05-27T09:20:32-07:00",
         "item":{
            "type":"folder",
            "id":"379625555",
            "sequence_id":"7",
            "etag":"7",
            "name":"NewBusiness"
         }
      },
      .... more groups ....,
   ]
}

在协作者列表中注明ID为“120995”的组“IT”。现在我请求该组的会员资格

curl https://api.box.com/2.0/groups/120995/memberships -H "Authorization: Bearer ACCESS_TOKEN"

我得到了这个奇怪的错误回复。

{
   "type":"error",
   "status":404,
   "code":"not_found",
   "context_info":{
      "errors":[
         {
            "reason":"invalid_parameter",
            "name":"group_tag",
            "message":"Invalid value 'g_120995'. 'group_tag' with value 'g_120995' not found"
         }
      ]
   },
   "help_url":"http:\/\/developers.box.com\/docs\/#errors",
   "message":"Not Found",
   "request_id":"184613996752e9780c42c3f"
}

有没有人看到类似的行为并找到了解决方案?

1 个答案:

答案 0 :(得分:0)

文档说:"请注意,这仅适用于群组管理员。"