This page describes how to list all long-running operations and how to
view the status of a long-running operation.

To check the status and display any additional error details of a long-running
operation, you'll need to get the value for <var translate="no">OPERATION_NAME</var>
first, and then you can request status.

## ListOperations

To list all long-running operations, send the following request:

    curl \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    https://blockchainnodeengine.googleapis.com/v1/projects/PROJECT_ID/\
    locations/LOCATION/operations

Where:

- <var translate="no">PROJECT_ID</var> is your Google Cloud project ID. For example, `my-project-id`.
- <var translate="no">LOCATION</var> is the [location](https://docs.cloud.google.com/blockchain-node-engine/docs/terms#location) in which your resources are hosted. For example, `us-central1`.

Here is a sample response to this command:

    {
      "operations": [
        {
          "name": "projects/my-project-id/locations/us-central1/operations/operation-1683321573175-5faf8d8696fe0-5f1906e4-eb1b6828",
          "metadata": {
            "@type": "type.googleapis.com/google.cloud.blockchainnodeengine.v1.OperationMetadata",
            "createTime": "2023-05-05T21:19:33.245698045Z",
            "endTime": "2023-05-05T21:58:44.520319810Z",
            "target": "projects/my-project-id/locations/us-central1/blockchainNodes/my-new-node-2",
            "verb": "create",
            "requestedCancellation": false,
            "apiVersion": "v1"
          },
          "done": true,
          "response": {
            "@type": "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode",
            "name": "projects/my-project-id/locations/us-central1/blockchainNodes/my-new-node-2",
            "createTime": "2023-05-05T21:19:33.308756Z",
            "updateTime": "2023-05-05T21:58:44.513286Z",
            "labels": {
              "label-key": "label-value"
            },
            "blockchainType": "ETHEREUM",
            "connectionInfo": {
              "ipInfo": {
                "rpcIpv4Address": "203.0.113.1"
              },
              "endpointInfo": {
                "jsonRpcApiEndpoint": "json-rpc.4amkczs2vkh8hjtghcipu7y2t.blockchainnodeengine.com",
                "websocketsApiEndpoint": "ws.4amkczs2vkh8hjtghcipu7y2t.blockchainnodeengine.com"
              }
            },
            "ethereumDetails": {
              "network": "MAINNET",
              "nodeType": "FULL",
              "executionClient": "GETH",
              "consensusClient": "LIGHTHOUSE",
              "apiEnableAdmin": false,
              "apiEnableDebug": false,
              "additionalEndpoints": {
                "beaconApiEndpoint": "beacon.4amkczs2vkh8hjtghcipu7y2t.blockchainnodeengine.com",
                "beaconPrometheusMetricsApiEndpoint": "bc-mc.4amkczs2vkh8hjtghcipu7y2t.blockchainnodeengine.com"
              }
            },
            "state": "RUNNING"
          }
        }
      ]
    }

Make a note of the <var translate="no">OPERATION_ID</var>, which looks like
the following:

    "name": "projects/my-project-id/locations/us-central1/operations/
        operation-1683321573175-5faf8d8696fe0-5f1906e4-eb1b6828",

> [!NOTE]
> **Note:** You can also get this information using [ListBlockchainNodes](https://docs.cloud.google.com/blockchain-node-engine/docs/reference/rest/v1/projects.locations.blockchainNodes/list).

## GetOperation

When you send a request and get a response, for example from
[CreateBlockchainNode](https://docs.cloud.google.com/blockchain-node-engine/docs/reference/rest/v1/projects.locations.blockchainNodes/create) or
[DeleteBlockchainNode](https://docs.cloud.google.com/blockchain-node-engine/docs/reference/rest/v1/projects.locations.blockchainNodes/delete),
the response includes the <var translate="no">OPERATION_ID</var>:

      "name": "projects/my-project-id/locations/us-central1/operations/
        operation-1683321573175-5faf8d8696fe0-5f1906e4-eb1b6828",

For this example, you'd set <var translate="no">OPERATION_NAME</var> to
`operation-1683321573175-5faf8d8696fe0-5f1906e4-eb1b6828`.

You can also get the operation name from the results of the
[ListOperations](https://docs.cloud.google.com/blockchain-node-engine/docs/reference/rest/v1/projects.locations.operations/list) command.

Once you have the value for <var translate="no">OPERATION_NAME</var>, send the
following request:

    curl \
      -H "Authorization: Bearer $(gcloud auth print-access-token)" \
      -H "Content-Type: application/json" \
    https://blockchainnodeengine.googleapis.com/v1/projects/PROJECT_ID/\
    locations/LOCATION/operations/OPERATION_NAME

Where:

- <var translate="no">PROJECT_ID</var> is your Google Cloud project ID. For example `my-project-id`.
- <var translate="no">LOCATION</var> is the [location](https://docs.cloud.google.com/blockchain-node-engine/docs/terms#location) in which your resources are hosted. For example, `us-central1`.
- <var translate="no">OPERATION_NAME</var> is a string specifying the operation. For example, `operation-1683321573175-5faf8d8696fe0-5f1906e4-eb1b6828`.

Here is an example response to the above command:

    {
      "name": "projects/my-project-id/locations/us-central1/operations/operation-1683321573175-5faf8d8696fe0-5f1906e4-eb1b6828",
      "metadata": {
        "@type": "type.googleapis.com/google.cloud.blockchainnodeengine.v1.OperationMetadata",
        "createTime": "2023-05-05T21:19:33.245698045Z",
        "endTime": "2023-05-05T21:58:44.520319810Z",
        "target": "projects/my-project-id/locations/us-central1/blockchainNodes/my-new-node-2",
        "verb": "create",
        "requestedCancellation": false,
        "apiVersion": "v1"
      },
      "done": true,
      "response": {
        "@type": "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode",
        "name": "projects/my-project-id/locations/us-central1/blockchainNodes/my-new-node-2",
        "createTime": "2023-05-05T21:19:33.308756Z",
        "updateTime": "2023-05-05T21:58:44.513286Z",
        "labels": {
          "label-key": "label-value"
        },
        "blockchainType": "ETHEREUM",
        "connectionInfo": {
          "ipInfo": {
            "rpcIpv4Address": "203.0.113.1"
          },
          "endpointInfo": {
            "jsonRpcApiEndpoint": "json-rpc.4amkczs2vkh8hjtghcipu7y2t.blockchainnodeengine.com",
            "websocketsApiEndpoint": "ws.4amkczs2vkh8hjtghcipu7y2t.blockchainnodeengine.com"
          }
        },
        "ethereumDetails": {
          "network": "MAINNET",
          "nodeType": "FULL",
          "executionClient": "GETH",
          "consensusClient": "LIGHTHOUSE",
          "apiEnableAdmin": false,
          "apiEnableDebug": false,
          "additionalEndpoints": {
            "beaconApiEndpoint": "beacon.4amkczs2vkh8hjtghcipu7y2t.blockchainnodeengine.com",
            "beaconPrometheusMetricsApiEndpoint": "bc-mc.4amkczs2vkh8hjtghcipu7y2t.blockchainnodeengine.com"
          }
        },
        "state": "RUNNING"
      }
    }

> [!NOTE]
> **Note:** You can also get this information using [GetBlockchainNode](https://docs.cloud.google.com/blockchain-node-engine/docs/reference/rest/v1/projects.locations.blockchainNodes/get).