ตั้งแต่วันที่
8 กันยายน 2025 เป็นต้นไป รายการโฆษณาใหม่ทุกรายการจะต้องประกาศว่าจะแสดงโฆษณาทางการเมืองในสหภาพยุโรป (EU) หรือไม่ การอัปโหลด API ของ Display & Video 360 และ SDF ที่ไม่ได้ระบุการประกาศจะล้มเหลว ดูรายละเอียดเพิ่มเติมเกี่ยวกับวิธีอัปเดตการผสานรวมเพื่อประกาศนี้ได้ที่
หน้าการเลิกใช้งาน
Method: users.bulkEditAssignedUserRoles
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คำขอ HTTP
POST https://displayvideo.googleapis.com/v4/users/{userId}:bulkEditAssignedUserRoles
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
userId |
string (int64 format)
ต้องระบุ รหัสของผู้ใช้ที่มีบทบาทของผู้ใช้ที่มอบหมาย
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"deletedAssignedUserRoles": [
string
],
"createdAssignedUserRoles": [
{
object (AssignedUserRole )
}
]
} |
ช่อง |
deletedAssignedUserRoles[] |
string
บทบาทของผู้ใช้ที่กำหนดให้ลบทีละหลายรายการ ซึ่งระบุเป็นรายการ assigned_user_role_ids รูปแบบของ assignedUserRoleId คือ entityType-entityid เช่น partner-123
|
createdAssignedUserRoles[] |
object (AssignedUserRole )
บทบาทของผู้ใช้ที่กำหนดให้สร้างเป็นกลุ่ม ซึ่งระบุเป็นรายการ AssignedUserRoles
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
createdAssignedUserRoles[] |
object (AssignedUserRole )
รายการบทบาทของผู้ใช้ที่ได้รับมอบหมายซึ่งสร้างเรียบร้อยแล้ว รายการนี้จะหายไปหากไม่มีข้อมูล
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/display-video-user-management
ดูข้อมูลเพิ่มเติมได้ที่ OAuth 2.0 Overview
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],["This Display & Video 360 API v4 beta feature allows bulk editing of user roles. It uses a `POST` request to modify roles. The process deletes specified `assigned_user_role_ids` and creates new roles. The request body includes lists for `deletedAssignedUserRoles` and `createdAssignedUserRoles`, using `entityType-entityid` format. The response returns a list of successfully created `AssignedUserRoles`. The user Id is a required path parameter and `display-video-user-management` is the required authorization scope.\n"],null,["# Method: users.bulkEditAssignedUserRoles\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BulkEditAssignedUserRolesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nBulk edits user roles for a user.\n\nThe operation will delete the assigned user roles provided in [BulkEditAssignedUserRolesRequest.deletedAssignedUserRoles](/display-video/api/reference/rest/v4/users/bulkEditAssignedUserRoles#body.request_body.FIELDS.deleted_assigned_user_roles) and then assign the user roles provided in [BulkEditAssignedUserRolesRequest.createdAssignedUserRoles](/display-video/api/reference/rest/v4/users/bulkEditAssignedUserRoles#body.request_body.FIELDS.created_assigned_user_roles).\n\nThis method has unique authentication requirements. Read the prerequisites in our [Managing Users guide](/display-video/api/guides/users/overview#prerequisites) before using this method.\n\nThe \"Try this method\" feature does not work for this method.\n\n### HTTP request\n\n`POST https://displayvideo.googleapis.com/v4/users/{userId}:bulkEditAssignedUserRoles`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `userId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the user to which the assigned user roles belong. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"deletedAssignedUserRoles\": [ string ], \"createdAssignedUserRoles\": [ { object (/display-video/api/reference/rest/v4/users#AssignedUserRole) } ] } ``` |\n\n| Fields ||\n|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `deletedAssignedUserRoles[]` | `string` The assigned user roles to delete in batch, specified as a list of [assigned_user_role_ids](/display-video/api/reference/rest/v4/users#AssignedUserRole.FIELDS.assigned_user_role_id). The format of assignedUserRoleId is `entityType-entityid`, for example `partner-123`. |\n| `createdAssignedUserRoles[]` | `object (`[AssignedUserRole](/display-video/api/reference/rest/v4/users#AssignedUserRole)`)` The assigned user roles to create in batch, specified as a list of [AssignedUserRoles](/display-video/api/reference/rest/v4/users#AssignedUserRole). |\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------|\n| ``` { \"createdAssignedUserRoles\": [ { object (/display-video/api/reference/rest/v4/users#AssignedUserRole) } ] } ``` |\n\n| Fields ||\n|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `createdAssignedUserRoles[]` | `object (`[AssignedUserRole](/display-video/api/reference/rest/v4/users#AssignedUserRole)`)` The list of assigned user roles that have been successfully created. This list will be absent if empty. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/display-video-user-management`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]