הרשאות: addMembers
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הוספה של חברים לנכס 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"
]
}
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 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 }"]]