Method: partners.devices.claimAsync
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Revendication d'un lot d'appareils pour un client de manière asynchrone. Permet d'ajouter les appareils à l'enregistrement sans contact. Pour en savoir plus, consultez la section Opérations par lot de longue durée.
Requête HTTP
POST https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claimAsync
L'URL utilise la syntaxe de transcodage gRPC.
Paramètres de chemin d'accès
Paramètres |
partnerId |
string (int64 format)
Obligatoire. ID du partenaire revendeur.
|
Corps de la requête
Le corps de la requête contient des données présentant la structure suivante :
Représentation JSON |
{
"claims": [
{
object (PartnerClaim )
}
]
} |
Champs |
claims[] |
object (PartnerClaim )
Obligatoire. Liste des revendications d'appareils.
|
Corps de la réponse
Si la requête aboutit, le corps de la réponse contient une instance de Operation
.
Champs d'application des autorisations
Requiert le niveau d'accès OAuth suivant :
https://www.googleapis.com/auth/androidworkprovisioning
Pour en savoir plus, consultez la Présentation d'OAuth 2.0.
PartnerClaim
Identifie une demande de revendication.
Représentation 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 .
} |
Champs |
deviceIdentifier |
object (DeviceIdentifier )
Obligatoire. Obligatoire. Identifiant de l'appareil.
|
sectionType |
enum (DeviceProvisioningSectionType )
Obligatoire. Type de section de l'enregistrement de provisionnement de l'appareil.
|
deviceMetadata |
object (DeviceMetadata )
Obligatoire. Métadonnées à joindre à l'appareil utilisé pour la revendication.
|
preProvisioningToken |
string
Facultatif. Doit et ne peut être défini que pour les appareils Chrome OS.
|
Champ d'union customer . Obligatoire. Client au nom duquel l'appareil est revendiqué. customer ne peut être qu'un des éléments suivants : |
customerId |
string (int64 format)
Identifiant du client pour lequel l'appareil est revendiqué.
|
googleWorkspaceCustomerId |
string
Numéro client Google Workspace.
|
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[null,null,["Dernière mise à jour le 2025/07/25 (UTC)."],[[["\u003cp\u003eThis endpoint \u003ccode\u003ePOST https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claimAsync\u003c/code\u003e enables partners to asynchronously claim a batch of devices for a customer, adding them to zero-touch enrollment.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003epartnerId\u003c/code\u003e path parameter, which is the reseller partner's ID, and a request body with a list of device claims within the \u003ccode\u003eclaims\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eEach device claim is identified by a \u003ccode\u003ePartnerClaim\u003c/code\u003e object, which contains the \u003ccode\u003edeviceIdentifier\u003c/code\u003e, \u003ccode\u003esectionType\u003c/code\u003e, \u003ccode\u003edeviceMetadata\u003c/code\u003e, and a customer identifier in the form of \u003ccode\u003ecustomerId\u003c/code\u003e or \u003ccode\u003egoogleWorkspaceCustomerId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePartnerClaim\u003c/code\u003e object optionally includes a \u003ccode\u003epreProvisioningToken\u003c/code\u003e and is required to complete the request.\u003c/p\u003e\n"],["\u003cp\u003eA successful request returns an \u003ccode\u003eOperation\u003c/code\u003e object, indicating that the long-running operation has been initiated.\u003c/p\u003e\n"]]],["This outlines how to claim devices for a customer asynchronously via the Android zero-touch enrollment API. Use a `POST` request to `https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claimAsync`, providing the required `partnerId`. The request body, structured in JSON, includes a list of device `claims` with each claim containing the `deviceIdentifier`, `sectionType`, `deviceMetadata`, and the required customer's ID (`customerId` or `googleWorkspaceCustomerId`). The `preProvisioningToken` field is required only for ChromeOS devices. The response body contains an `Operation`.\n"],null,["# Method: partners.devices.claimAsync\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- [Authorization Scopes](#body.aspect)\n- [PartnerClaim](#PartnerClaim)\n - [JSON representation](#PartnerClaim.SCHEMA_REPRESENTATION)\n\nClaims a batch of devices for a customer asynchronously. Adds the devices to zero-touch enrollment. To learn more, read [Long‑running batch operations](/zero-touch/guides/how-it-works#operations).\n\n### HTTP request\n\n`POST https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:claimAsync`\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| ``` { \"claims\": [ { object (/zero-touch/reference/reseller/rest/v1/partners.devices/claimAsync#PartnerClaim) } ] } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| `claims[]` | `object (`[PartnerClaim](/zero-touch/reference/reseller/rest/v1/partners.devices/claimAsync#PartnerClaim)`)` Required. A list of device claims. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/zero-touch/reference/reseller/rest/v1/operations#Operation).\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).\n\nPartnerClaim\n------------\n\nIdentifies one claim request.\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. Device identifier of the device. |\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)`)` Required. The metadata to attach to the device at claim. |\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. |"]]