สิทธิ์: แพตช์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
อัปเดตสิทธิ์สําหรับชิ้นงาน Looker Studio
ส่งคำขอ
คำขอ HTTP
PATCH https://datastudio.googleapis.com/v1/assets/{assetName}/permissions
พารามิเตอร์เส้นทาง
ชื่อพารามิเตอร์ |
ประเภท |
คำอธิบาย |
assetName |
สตริง |
ชื่อ (รหัส) ของเนื้อหา |
การให้สิทธิ์
คำขอนี้กำหนดให้ผู้ใช้ที่ได้รับอนุญาตมีสิทธิ์เพียงพอที่จะ
จัดการสิทธิ์และการให้สิทธิ์เนื้อหาตามขอบเขตต่อไปนี้
ขอบเขต |
https://www.googleapis.com/auth/datastudio |
เนื้อหาของคำขอ
ในเนื้อหาคำขอ ให้ระบุพร็อพเพอร์ตี้ต่อไปนี้
ชื่อพร็อพเพอร์ตี้ |
ประเภท |
คำอธิบาย |
สิทธิ์
|
สิทธิ์
|
ออบเจ็กต์สิทธิ์ที่อัปเดตแล้ว
อัปเดตบทบาท OWNER ไม่ได้ |
คำตอบ
หากทำสำเร็จ เมธอดนี้จะแสดงออบเจ็กต์สิทธิ์ที่อัปเดตใหม่
ตัวอย่าง
รายการต่อไปนี้จะอัปเดตสิทธิ์สำหรับเนื้อหา Looker Studio
PATCH https://datastudio.googleapis.com/v1/assets/assetName/permissions
เนื้อหาคำขอ:
{
"permissions": {
"permissions": {
"OWNER": {
"members": [
"user:jen@gmail.com"
]
},
"VIEWER": {
"members": [
"user:gus@gmail.com"
]
}
}
}
}
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eThis document outlines how to update permissions for a Looker Studio asset using the \u003ccode\u003ePATCH\u003c/code\u003e method and provides details about the required request parameters and authorization scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should include the updated permissions object, specifying roles (like OWNER, VIEWER) and their corresponding members, but note that the OWNER role cannot be modified.\u003c/p\u003e\n"],["\u003cp\u003eA successful request will return the updated Permissions object, confirming the changes made to the asset's access control.\u003c/p\u003e\n"]]],[],null,["# Permissions: patch\n\nUpdate permissions for a Looker Studio asset.\n\nRequest\n-------\n\n### HTTP request\n\n PATCH https://datastudio.googleapis.com/v1/assets/{assetName}/permissions\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\nmanage asset permissions 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| permissions | [Permissions](/looker-studio/integrate/api/reference/types#Permissions) | The updated permissions object. The `OWNER` role cannot be updated. |\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 updates the permissions for a Looker Studio asset. \n\n PATCH https://datastudio.googleapis.com/v1/assets/\u003cvar translate=\"no\"\u003eassetName\u003c/var\u003e/permissions\n\nRequest body: \n\n {\n \"permissions\": {\n \"permissions\": {\n \"OWNER\": {\n \"members\": [\n \"user:jen@gmail.com\"\n ]\n },\n \"VIEWER\": {\n \"members\": [\n \"user:gus@gmail.com\"\n ]\n }\n }\n }\n }"]]