權限:新增成員
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
將成員新增至 Looker Studio 資產。
要求
HTTP 要求
POST https://datastudio.googleapis.com/v1/assets/{assetName}/permissions:addMembers
路徑參數
參數名稱 |
類型 |
說明 |
assetName |
字串 |
資產名稱 (ID)。 |
授權
這項要求需要取得授權的使用者俱備足夠的權限才能新增
擁有下列範圍的資產和授權成員:
範圍 |
https://www.googleapis.com/auth/datastudio |
要求主體
在要求主體中,提供下列屬性:
屬性名稱 |
類型 |
說明 |
角色
|
角色
|
要新增成員的角色。 成員
無法新增至OWNER 角色。 |
成員 |
陣列<成員> |
要新增的成員。 |
回應
如果成功,這個方法會傳回更新後的 Permissions 物件。
範例
以下為 Looker Studio 資產新增兩位檢視者成員。
POST https://datastudio.googleapis.com/v1/assets/assetName/permissions:addMembers
要求主體:
{
"role": "VIEWER",
"members": [
"user:gus@gmail.com",
"user:jen@gmail.com"
]
}
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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 }"]]