Kể từ
ngày 8 tháng 9 năm 2025, mỗi mục hàng mới sẽ cần phải khai báo xem mục hàng đó có phân phát quảng cáo chính trị ở Liên minh Châu Âu (EU) hay không. Display & Video 360 API và các tệp SDF được tải lên mà không cung cấp thông tin khai báo sẽ không thành công. Hãy xem
trang thông báo về những nội dung không dùng nữa để biết thêm thông tin về cách cập nhật quy trình tích hợp để đưa ra nội dung khai báo này.
Method: users.bulkEditAssignedUserRoles
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.
Yêu cầu HTTP
POST https://displayvideo.googleapis.com/v4/users/{userId}:bulkEditAssignedUserRoles
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
userId |
string (int64 format)
Bắt buộc. Mã nhận dạng của người dùng sở hữu các vai trò người dùng được chỉ định.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"deletedAssignedUserRoles": [
string
],
"createdAssignedUserRoles": [
{
object (AssignedUserRole )
}
]
} |
Trường |
deletedAssignedUserRoles[] |
string
Các vai trò của người dùng được chỉ định để xoá hàng loạt, được chỉ định dưới dạng danh sách assigned_user_role_ids . Định dạng của assignedUserRoleId là entityType-entityid , ví dụ: partner-123 .
|
createdAssignedUserRoles[] |
object (AssignedUserRole )
Các vai trò người dùng được chỉ định để tạo hàng loạt, được chỉ định dưới dạng danh sách AssignedUserRoles .
|
Nội dung phản hồi
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"createdAssignedUserRoles": [
{
object (AssignedUserRole )
}
]
} |
Trường |
createdAssignedUserRoles[] |
object (AssignedUserRole )
Danh sách các vai trò của người dùng đã được chỉ định và tạo thành công. Danh sách này sẽ không xuất hiện nếu trống.
|
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/display-video-user-management
Để biết thêm thông tin, hãy xem OAuth 2.0 Overview.
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."],[],["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)."]]