权限:addMembers
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
向 Looker Studio 资源添加成员。
请求
HTTP 请求
POST https://datastudio.googleapis.com/v1/assets/{assetName}/permissions:addMembers
路径参数
参数名称 |
类型 |
说明 |
assetName |
字符串 |
资产的名称 (ID)。 |
授权
此请求要求授权用户拥有足够的权限来添加
成员添加到资产和授权,范围如下:
范围 |
https://www.googleapis.com/auth/datastudio |
请求正文
在请求正文中提供以下属性:
属性名称 |
类型 |
说明 |
角色
|
角色
|
要将成员添加到的角色。 成员
不能添加到 OWNER 角色中。 |
成员 |
数组<成员> |
要添加的成员。 |
响应
如果成功,此方法将返回更新后的权限对象。
示例
以下命令会将两个查看者成员添加到一个 Looker Studio 资源中。
POST https://datastudio.googleapis.com/v1/assets/assetName/permissions:addMembers
请求正文:
{
"role": "VIEWER",
"members": [
"user:gus@gmail.com",
"user:jen@gmail.com"
]
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eAdds members with specified roles (excluding OWNER) to a Looker Studio asset using the asset's name (ID).\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/datastudio\u003c/code\u003e scope and sufficient permissions to add members.\u003c/p\u003e\n"],["\u003cp\u003eThe request body specifies the desired role and a list of members to add (using their email addresses).\u003c/p\u003e\n"],["\u003cp\u003eUpon successful execution, the updated Permissions object for the asset is returned.\u003c/p\u003e\n"]]],[],null,["# Permissions: addMembers\n\nAdds members to a Looker Studio asset.\n\nRequest\n-------\n\n### HTTP request\n\n POST https://datastudio.googleapis.com/v1/assets/{assetName}/permissions:addMembers\n\n### Path parameters\n\n| Parameter name | Type | Description |\n|----------------|--------|-----------------------------|\n| assetName | string | The name (ID) of the asset. |\n\n### Authorization\n\nThis request requires the authorized user to have sufficient permissions to add\nmembers to the asset and authorization with the following scope:\n\n| Scope |\n|----------------------------------------------|\n| `https://www.googleapis.com/auth/datastudio` |\n\n### Request body\n\nIn the request body, supply the following properties:\n\n| Property name | Type | Description |\n|---------------|------------------------------------------------------------------------|--------------------------------------------------------------------------|\n| role | [Role](/looker-studio/integrate/api/reference/types#Role) | The role to add members to. Members cannot be added to the `OWNER` role. |\n| members | Array\\\u003c[Member](/looker-studio/integrate/api/reference/types#Member)\\\u003e | The members to add. |\n\nResponse\n--------\n\nIf successful, this method returns the updated [Permissions](/looker-studio/integrate/api/reference/types#Permissions) object.\n\nExample\n-------\n\nThe following adds two viewer members to a Looker Studio asset. \n\n POST https://datastudio.googleapis.com/v1/assets/\u003cvar translate=\"no\"\u003eassetName\u003c/var\u003e/permissions:addMembers\n\nRequest body: \n\n {\n \"role\": \"VIEWER\",\n \"members\": [\n \"user:gus@gmail.com\",\n \"user:jen@gmail.com\"\n ]\n }"]]