Method: partners.devices.claim
为客户认领设备并将其添加到零触摸注册。如果该设备已被其他客户声明,则调用将返回错误。
HTTP 请求
POST https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claim
网址采用 gRPC 转码语法。
路径参数
参数 |
partnerId |
string (int64 format)
必需。转销商合作伙伴的 ID。
|
请求正文
请求正文中包含结构如下的数据:
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 .
} |
字段 |
deviceIdentifier |
object (DeviceIdentifier )
必需。必需。要声明所有权的设备的标识符。
|
sectionType |
enum (DeviceProvisioningSectionType )
必需。设备配置记录所属的部分类型。
|
deviceMetadata |
object (DeviceMetadata )
可选。要附加到设备的元数据。
|
preProvisioningToken |
string
可选。必须且只能为 ChromeOS 设备设置。
|
联合字段 customer 。必需。声明设备所有权的客户。customer 只能是下列其中一项: |
customerId |
string (int64 format)
声明设备所有权的客户的 ID。
|
googleWorkspaceCustomerId |
string
Google Workspace 客户 ID。
|
响应正文
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"deviceId": string,
"deviceName": string
} |
字段 |
deviceId |
string (int64 format)
已声明所有权的设备的 ID。
|
deviceName |
string
设备的资源名称,格式为 partners/[PARTNER_ID]/devices/[DEVICE_ID] 。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidworkprovisioning
如需了解详情,请参阅 OAuth 2.0 概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-29。
[null,null,["最后更新时间 (UTC):2024-08-29。"],[[["This 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."],["The HTTP request to claim a device is a POST request to `https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claim`, requiring the reseller partner's ID in the path parameters."],["The request body must include the `deviceIdentifier`, `sectionType`, and the customer's ID (`customerId` or `googleWorkspaceCustomerId`), along with optional fields such as `deviceMetadata` and `preProvisioningToken` for Chrome OS devices."],["A successful response contains the `deviceId` of the claimed device and its resource name in the format `partners/[PARTNER_ID]/devices/[DEVICE_ID]`."],["This action requires the OAuth scope `https://www.googleapis.com/auth/androidworkprovisioning` for authorization."]]],["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"]]