# listOperations

An [`Operation`](https://developers.google.com/zero-touch/reseller-library/reference/objects#operation)
contains the status of an asynchronous API call. This method lists operations
matching a specified [`OperationType`](https://developers.google.com/zero-touch/reseller-library/reference/methods/listoperations#/zero-touch/reseller-library/reference/objects#operation)
and/or [`OperationState`](https://developers.google.com/zero-touch/reseller-library/reference/methods/listoperations#/zero-touch/reseller-library/reference/objects#operation).

> [!NOTE]
> **Note:** The `ResellerService` class created by `GoogleResellerServiceFactory` doesn't support this API.

## Method signature

    public ListOperationsResponse listOperations(ListOperationsRequest request) throws CommonException;

## ListOperationsRequest

| Property name | Value | Required | Description |
|---|---|---|---|
| `operationType` | `enum(`[`OperationType`](https://developers.google.com/zero-touch/reseller-library/reference/methods/listoperations#/zero-touch/reseller-library/reference/objects#operation)`)` | No | The operation type: `CLAIM_DEVICES`, `UNCLAIM_DEVICES`, `UPDATE_CLAIMS`. |
| `state` | `enum(`[`OperationState`](https://developers.google.com/zero-touch/reseller-library/reference/methods/listoperations#/zero-touch/reseller-library/reference/objects#operation)`)` | No | The operation state: `IN_PROGRESS`, `COMPLETE`, `COMPLETE_WITH_ERRORS`. |
| `pageSize` | `int` | No | The page size, up to `100`. If greater than `100` or `null`, `100` is used. |
| `pageToken` | `string` | No | The page token. If empty, the first page is returned. |
| `vendorParams` | `map` | No | Extra fields, vendor specified key-value pair. |

## ListOperationsResponse

| Property name | Value | Description |
|---|---|---|
| `operations` | List of `object(`[`Operation`](https://developers.google.com/zero-touch/reseller-library/reference/objects#operation)`)` | The list of operations matching the request. |
| `totalCount` | `int` | The total count of devices matching the request. |
| `nextPageToken` | `strong` | The next page token. Empty for the last page. |
| `vendorParams` | `map` | Extra fields, vendor specified key-value pair. |

## Error behavior

If an error occurs, the library throws a `CommonException` containing one of the
following error codes:

| Error code |
|---|
| `INTERNAL_SERVER_ERROR` |
| `INVALID_PAGE_TOKEN` |
| `NOT_IMPLEMENTED` |