Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Un Operation contient l'état d'un appel d'API asynchrone. Cette méthode liste les opérations correspondant à un OperationType et/ou OperationState spécifié.
Nombre total d'appareils correspondant à la requête.
nextPageToken
strong
Jeton de la page suivante. Vide pour la dernière page.
vendorParams
map
Champs supplémentaires, paire clé-valeur spécifiée par le fournisseur.
Comportement en cas d'erreur
Si une erreur se produit, la bibliothèque génère une CommonException contenant l'un des codes d'erreur suivants:
Code d'erreur
INTERNAL_SERVER_ERROR
INVALID_PAGE_TOKEN
NOT_IMPLEMENTED
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/08/29 (UTC).
[null,null,["Dernière mise à jour le 2025/08/29 (UTC)."],[[["\u003cp\u003eThis API method, \u003ccode\u003elistOperations\u003c/code\u003e, retrieves the status of asynchronous API calls, referred to as \u003ccode\u003eOperation\u003c/code\u003e, based on specified criteria.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elistOperations\u003c/code\u003e method allows filtering by \u003ccode\u003eOperationType\u003c/code\u003e (e.g., \u003ccode\u003eCLAIM_DEVICES\u003c/code\u003e, \u003ccode\u003eUNCLAIM_DEVICES\u003c/code\u003e) and/or \u003ccode\u003eOperationState\u003c/code\u003e (e.g., \u003ccode\u003eIN_PROGRESS\u003c/code\u003e, \u003ccode\u003eCOMPLETE\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe request, \u003ccode\u003eListOperationsRequest\u003c/code\u003e, supports pagination via \u003ccode\u003epageSize\u003c/code\u003e (up to 100) and \u003ccode\u003epageToken\u003c/code\u003e parameters, allowing for retrieval of large datasets.\u003c/p\u003e\n"],["\u003cp\u003eThe response, \u003ccode\u003eListOperationsResponse\u003c/code\u003e, provides a list of matching \u003ccode\u003eOperation\u003c/code\u003e objects, the total count of operations, and a \u003ccode\u003enextPageToken\u003c/code\u003e for subsequent pages.\u003c/p\u003e\n"],["\u003cp\u003ePotential errors during operation execution are indicated by a \u003ccode\u003eCommonException\u003c/code\u003e with error codes like \u003ccode\u003eINTERNAL_SERVER_ERROR\u003c/code\u003e, \u003ccode\u003eINVALID_PAGE_TOKEN\u003c/code\u003e, or \u003ccode\u003eNOT_IMPLEMENTED\u003c/code\u003e.\u003c/p\u003e\n"]]],["This content describes how to list asynchronous API call operations using `listOperations`. You can filter operations by `operationType` (e.g., `CLAIM_DEVICES`) and `state` (e.g., `IN_PROGRESS`). The method takes a `ListOperationsRequest` with optional parameters like `pageSize`, `pageToken`, and `vendorParams`. It returns a `ListOperationsResponse` containing matching operations, total count, `nextPageToken`, and `vendorParams`. The method may throw a `CommonException` with errors like `INTERNAL_SERVER_ERROR`, `INVALID_PAGE_TOKEN`, or `NOT_IMPLEMENTED`.\n"],null,["# listOperations\n\nAn [`Operation`](/zero-touch/reseller-library/reference/objects#operation)\ncontains the status of an asynchronous API call. This method lists operations\nmatching a specified [`OperationType`](#/zero-touch/reseller-library/reference/objects#operation)\nand/or [`OperationState`](#/zero-touch/reseller-library/reference/objects#operation).\n| **Note:** The `ResellerService` class created by `GoogleResellerServiceFactory` doesn't support this API.\n\nMethod signature\n----------------\n\n public ListOperationsResponse listOperations(ListOperationsRequest request) throws CommonException;\n\nListOperationsRequest\n---------------------\n\n| Property name | Value | Required | Description |\n|-----------------|-----------------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------------|\n| `operationType` | `enum(`[`OperationType`](#/zero-touch/reseller-library/reference/objects#operation)`)` | No | The operation type: `CLAIM_DEVICES`, `UNCLAIM_DEVICES`, `UPDATE_CLAIMS`. |\n| `state` | `enum(`[`OperationState`](#/zero-touch/reseller-library/reference/objects#operation)`)` | No | The operation state: `IN_PROGRESS`, `COMPLETE`, `COMPLETE_WITH_ERRORS`. |\n| `pageSize` | `int` | No | The page size, up to `100`. If greater than `100` or `null`, `100` is used. |\n| `pageToken` | `string` | No | The page token. If empty, the first page is returned. |\n| `vendorParams` | `map` | No | Extra fields, vendor specified key-value pair. |\n\nListOperationsResponse\n----------------------\n\n| Property name | Value | Description |\n|-----------------|---------------------------------------------------------------------------------------------|--------------------------------------------------|\n| `operations` | List of `object(`[`Operation`](/zero-touch/reseller-library/reference/objects#operation)`)` | The list of operations matching the request. |\n| `totalCount` | `int` | The total count of devices matching the request. |\n| `nextPageToken` | `strong` | The next page token. Empty for the last page. |\n| `vendorParams` | `map` | Extra fields, vendor specified key-value pair. |\n\nError behavior\n--------------\n\nIf an error occurs, the library throws a `CommonException` containing one of the\nfollowing error codes:\n\n| Error code |\n|-------------------------|\n| `INTERNAL_SERVER_ERROR` |\n| `INVALID_PAGE_TOKEN` |\n| `NOT_IMPLEMENTED` |"]]