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 )
必要欄位。必要欄位。要聲明擁有權的裝置 ID。
|
sectionType |
enum (DeviceProvisioningSectionType )
必要欄位。裝置佈建記錄的部分類型。
|
deviceMetadata |
object (DeviceMetadata )
選用設定。要附加到裝置的中繼資料。
|
preProvisioningToken |
string
選用設定。只能在 Chrome OS 裝置上設定,且只能設定一次。
|
聯集欄位 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 總覽。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-29 (世界標準時間)。
[null,null,["上次更新時間: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"]]