Method: partners.devices.updateMetadataAsync
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
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 page details how to asynchronously update reseller metadata for a batch of devices using the Android Device Provisioning Partner API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePOST\u003c/code\u003e request is made to a specific URL with a required \u003ccode\u003epartnerId\u003c/code\u003e in the path, using gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include a JSON object that specifies the list of metadata updates to be applied using the \u003ccode\u003eUpdateMetadataArguments\u003c/code\u003e format.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eUpdateMetadataArguments\u003c/code\u003e entry must include the \u003ccode\u003edeviceMetadata\u003c/code\u003e to be updated, as well as a device identifier, whether through a \u003ccode\u003edeviceIdentifier\u003c/code\u003e object or a \u003ccode\u003edeviceId\u003c/code\u003e string.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidworkprovisioning\u003c/code\u003e OAuth scope for authorization, and a successful response returns an \u003ccode\u003eOperation\u003c/code\u003e instance to monitor the progress.\u003c/p\u003e\n"]]],["This describes an asynchronous API method for updating reseller metadata on multiple devices. It uses a `POST` request to `https://androiddeviceprovisioning.googleapis.com/v1/partners/{partnerId}/devices:updateMetadataAsync`, requiring a `partnerId` path parameter. The request body needs an array of `updates`, each with device-specific metadata, identified by either `deviceIdentifier` or `deviceId`. The `Operation` object tracks progress for these metadata modifications, which requires the `https://www.googleapis.com/auth/androidworkprovisioning` authorization scope.\n"],null,["# Method: partners.devices.updateMetadataAsync\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- [UpdateMetadataArguments](#UpdateMetadataArguments)\n - [JSON representation](#UpdateMetadataArguments.SCHEMA_REPRESENTATION)\n\nUpdates the reseller metadata attached to a batch of devices. This method updates devices asynchronously and returns an `Operation` that can be used to track progress. 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:updateMetadataAsync`\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 reseller partner ID. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"updates\": [ { object (/zero-touch/reference/reseller/rest/v1/partners.devices/updateMetadataAsync#UpdateMetadataArguments) } ] } ``` |\n\n| Fields ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updates[]` | `object (`[UpdateMetadataArguments](/zero-touch/reference/reseller/rest/v1/partners.devices/updateMetadataAsync#UpdateMetadataArguments)`)` Required. The list of metadata updates. |\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\nUpdateMetadataArguments\n-----------------------\n\nIdentifies metadata updates to one device.\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"deviceMetadata\": { object (/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceMetadata) }, // Union field `device` can be only one of the following: \"deviceIdentifier\": { object (/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceIdentifier) }, \"deviceId\": string // End of list of possible types for union field `device`. } ``` |\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------|---|\n| `deviceMetadata` | `object (`[DeviceMetadata](/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceMetadata)`)` Required. The metadata to update. |\n| Union field `device`. Required. The device to update. `device` can be only one of the following: |||\n| `deviceIdentifier` | `object (`[DeviceIdentifier](/zero-touch/reference/reseller/rest/v1/partners.devices#DeviceIdentifier)`)` Required. Device identifier. |\n| `deviceId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. Device ID of the device. |"]]