Quyền: addmemberships
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Thêm thành viên vào thành phần trong Looker Studio.
Yêu cầu
Yêu cầu HTTP
POST https://datastudio.googleapis.com/v1/assets/{assetName}/permissions:addMembers
Tham số đường dẫn
Tên thông số |
Loại |
Mô tả |
assetName |
string |
Tên (ID) nội dung. |
Ủy quyền
Yêu cầu này đòi hỏi người dùng được uỷ quyền phải có đủ quyền để thêm
thành viên với tài sản và uỷ quyền trong phạm vi sau:
Phạm vi |
https://www.googleapis.com/auth/datastudio |
Nội dung yêu cầu
Trong nội dung yêu cầu, hãy cung cấp các thuộc tính sau:
Tên tài sản |
Loại |
Mô tả |
vai trò
|
Vai trò
|
Vai trò thêm thành viên. Thành viên
Không thể thêm vào vai trò OWNER . |
thành viên |
Mảng<Thành viên> |
Thành viên cần thêm. |
Phản hồi
Nếu thành công, phương thức này sẽ trả về đối tượng Permissions đã được cập nhật.
Ví dụ:
Thao tác sau đây sẽ thêm 2 thành viên người xem vào một thành phần trong Looker Studio.
POST https://datastudio.googleapis.com/v1/assets/assetName/permissions:addMembers
Nội dung yêu cầu:
{
"role": "VIEWER",
"members": [
"user:gus@gmail.com",
"user:jen@gmail.com"
]
}
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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 }"]]