Method: partners.devices.claim
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.
Xác nhận một thiết bị cho khách hàng và thêm thiết bị đó vào quy trình thiết lập tự động. Nếu một khách hàng khác đã xác nhận thiết bị, cuộc gọi sẽ trả về lỗi.
Yêu cầu HTTP
POST https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claim
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
partnerId |
string (int64 format)
Bắt buộc. Mã của đối tác đại lý.
|
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 |
{
"deviceIdentifier": {
object (DeviceIdentifier )
},
"sectionType": enum (DeviceProvisioningSectionType ),
"deviceMetadata": {
object (DeviceMetadata )
},
"preProvisioningToken": string,
// Union field customer can be only one of the following:
"customerId": string,
"googleWorkspaceCustomerId": string
// End of list of possible types for union field customer .
} |
Trường |
deviceIdentifier |
object (DeviceIdentifier )
Bắt buộc. Bắt buộc. Mã nhận dạng thiết bị của thiết bị để xác nhận quyền sở hữu.
|
sectionType |
enum (DeviceProvisioningSectionType )
Bắt buộc. Loại mục của bản ghi cấp phép của thiết bị.
|
deviceMetadata |
object (DeviceMetadata )
Không bắt buộc. Siêu dữ liệu cần đính kèm vào thiết bị.
|
preProvisioningToken |
string
Không bắt buộc. Phải và chỉ có thể được đặt cho các thiết bị ChromeOS.
|
Trường kết hợp customer . Bắt buộc. Khách hàng mà thiết bị đang được xác nhận quyền sở hữu. customer chỉ có thể là một trong những trạng thái sau đây: |
customerId |
string (int64 format)
Mã của khách hàng được yêu cầu xác nhận thiết bị.
|
googleWorkspaceCustomerId |
string
Mã khách hàng Google Workspace.
|
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:
Tin nhắn phản hồi chứa mã thiết bị của thông báo xác nhận quyền sở hữu.
Biểu diễn dưới dạng JSON |
{
"deviceId": string,
"deviceName": string
} |
Trường |
deviceId |
string (int64 format)
Mã thiết bị của thiết bị đã được xác nhận quyền sở hữu.
|
deviceName |
string
Tên tài nguyên của thiết bị ở định dạng partners/[PARTNER_ID]/devices/[DEVICE_ID] .
|
Phạm vi cấp phép
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/androidworkprovisioning
Để biết thêm thông tin, hãy xem bài viết Tổng quan về OAuth 2.0.
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\u003eThis endpoint claims a device for a customer, adding it to zero-touch enrollment, and returns an error if the device is already claimed by another customer.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request to claim a device is a POST request to \u003ccode\u003ehttps://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claim\u003c/code\u003e, requiring the reseller partner's ID in the path parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include the \u003ccode\u003edeviceIdentifier\u003c/code\u003e, \u003ccode\u003esectionType\u003c/code\u003e, and the customer's ID (\u003ccode\u003ecustomerId\u003c/code\u003e or \u003ccode\u003egoogleWorkspaceCustomerId\u003c/code\u003e), along with optional fields such as \u003ccode\u003edeviceMetadata\u003c/code\u003e and \u003ccode\u003epreProvisioningToken\u003c/code\u003e for Chrome OS devices.\u003c/p\u003e\n"],["\u003cp\u003eA successful response contains the \u003ccode\u003edeviceId\u003c/code\u003e of the claimed device and its resource name in the format \u003ccode\u003epartners/[PARTNER_ID]/devices/[DEVICE_ID]\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis action requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/androidworkprovisioning\u003c/code\u003e for authorization.\u003c/p\u003e\n"]]],["This describes claiming a device for a customer via a `POST` request to `https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claim`. The request requires a `partnerId` and a body specifying the `deviceIdentifier`, `sectionType`, and the customer using either `customerId` or `googleWorkspaceCustomerId`. Optional fields include `deviceMetadata` and `preProvisioningToken`. A successful response includes the claimed `deviceId` and `deviceName`. The operation requires the `https://www.googleapis.com/auth/androidworkprovisioning` OAuth scope.\n"],null,["# Method: partners.devices.claim\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.ClaimDeviceResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n\nClaims a device for a customer and adds it to zero-touch enrollment. If the device is already claimed by another customer, the call returns an error.\n\n### HTTP request\n\n`POST https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claim`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------|\n| `partnerId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the reseller partner. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"deviceIdentifier\": { object (/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceIdentifier) }, \"sectionType\": enum (/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceProvisioningSectionType), \"deviceMetadata\": { object (/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceMetadata) }, \"preProvisioningToken\": string, // Union field `customer` can be only one of the following: \"customerId\": string, \"googleWorkspaceCustomerId\": string // End of list of possible types for union field `customer`. } ``` |\n\n| Fields ||\n|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `deviceIdentifier` | `object (`[DeviceIdentifier](/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceIdentifier)`)` Required. Required. The device identifier of the device to claim. |\n| `sectionType` | `enum (`[DeviceProvisioningSectionType](/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceProvisioningSectionType)`)` Required. The section type of the device's provisioning record. |\n| `deviceMetadata` | `object (`[DeviceMetadata](/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceMetadata)`)` Optional. The metadata to attach to the device. |\n| `preProvisioningToken` | `string` Optional. Must and can only be set for Chrome OS devices. |\n| Union field `customer`. Required. The customer for whom the device is being claimed. `customer` can be only one of the following: ||\n| `customerId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The ID of the customer for whom the device is being claimed. |\n| `googleWorkspaceCustomerId` | `string` The Google Workspace customer ID. |\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message containing device id of the claim.\n\n| JSON representation |\n|------------------------------------------------------|\n| ``` { \"deviceId\": string, \"deviceName\": string } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------|\n| `deviceId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The device ID of the claimed device. |\n| `deviceName` | `string` The resource name of the device in the format `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. |\n\n### Authorization Scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidworkprovisioning`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]