Dropbox API V2 list_file_members/batch 空结果
Dropbox API V2 list_file_members/batch empty results
我目前正在尝试使用 Dropbox list_file_members API 端点,因为在我看来它是唯一可以找出谁拥有文件的地方(
请参阅从文档页面获取的示例结果)
{
"users": [
{
"access_type": {
".tag": "owner"
},
"user": {
"account_id": "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc",
"same_team": true,
"team_member_id": "dbmid:abcd1234"
},
"permissions": [],
"is_inherited": false
}
],
"groups":[...]
...
}
但是,当我在单个文件上调用 API 时,我得到以下
{
"users": [],
"groups": [
{
"access_type": {
".tag": "editor"
},
"permissions": [],
"is_inherited": true,
"group": {
"group_name": "Everyone at TEAM_NAME_HERE",
"group_id": "g:GROUP_ID_HERE",
"member_count": 6,
"group_management_type": {
".tag": "company_managed"
},
"group_type": {
".tag": "team"
},
"is_owner": false,
"same_team": true
}
}
],
"invitees": []
}
此结果不包含所有者信息,所以我假设这是因为每个人都具有相同的访问级别??
当我尝试使用 sharing_list_file_members/batch 端点批量调用文件时,问题变得更糟,我得到以下结果
[
{
"file": "id:THIS_IS_MY_FILE_ID",
"result": {
".tag": "result",
"members": {
"users": [],
"groups": [],
"invitees": []
},
"member_count": 0
}
}
]
显然这更没有帮助,当我通过自己的 PHP 以及 API 浏览器访问 API 时也是如此,谁能告诉我在哪里我出错了,为什么我在批量完成时没有从用户甚至组中获得任何结果?
/2/sharing/list_file_members 端点记录为:
Use to obtain the members who have been invited to a file, both inherited and uninherited members.
/2/sharing/list_file_members/batch 端点记录为:
Get members of multiple files at once. The arguments to this route are more limited, and the limit on query result size per file is more strict. To customize the results more, use the individual file endpoint.
Inherited users are not included in the result, and permissions are not returned for this endpoint.
听起来您的示例文件位于团队文件夹中,因此为您的非批处理示例列出的组是团队组,即继承组。文档表明在使用批处理端点时不需要该组。
我目前正在尝试使用 Dropbox list_file_members API 端点,因为在我看来它是唯一可以找出谁拥有文件的地方( 请参阅从文档页面获取的示例结果)
{
"users": [
{
"access_type": {
".tag": "owner"
},
"user": {
"account_id": "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc",
"same_team": true,
"team_member_id": "dbmid:abcd1234"
},
"permissions": [],
"is_inherited": false
}
],
"groups":[...]
...
}
但是,当我在单个文件上调用 API 时,我得到以下
{
"users": [],
"groups": [
{
"access_type": {
".tag": "editor"
},
"permissions": [],
"is_inherited": true,
"group": {
"group_name": "Everyone at TEAM_NAME_HERE",
"group_id": "g:GROUP_ID_HERE",
"member_count": 6,
"group_management_type": {
".tag": "company_managed"
},
"group_type": {
".tag": "team"
},
"is_owner": false,
"same_team": true
}
}
],
"invitees": []
}
此结果不包含所有者信息,所以我假设这是因为每个人都具有相同的访问级别??
当我尝试使用 sharing_list_file_members/batch 端点批量调用文件时,问题变得更糟,我得到以下结果
[
{
"file": "id:THIS_IS_MY_FILE_ID",
"result": {
".tag": "result",
"members": {
"users": [],
"groups": [],
"invitees": []
},
"member_count": 0
}
}
]
显然这更没有帮助,当我通过自己的 PHP 以及 API 浏览器访问 API 时也是如此,谁能告诉我在哪里我出错了,为什么我在批量完成时没有从用户甚至组中获得任何结果?
/2/sharing/list_file_members 端点记录为:
Use to obtain the members who have been invited to a file, both inherited and uninherited members.
/2/sharing/list_file_members/batch 端点记录为:
Get members of multiple files at once. The arguments to this route are more limited, and the limit on query result size per file is more strict. To customize the results more, use the individual file endpoint. Inherited users are not included in the result, and permissions are not returned for this endpoint.
听起来您的示例文件位于团队文件夹中,因此为您的非批处理示例列出的组是团队组,即继承组。文档表明在使用批处理端点时不需要该组。