You can retrieve a list of all the feature view instances created within an online store
in your Google Cloud project. For each feature view, you can also view the feature
data source, which can be either of the following:

- One or more feature groups and their constituent features. Each feature group
  is associated with a feature data source, such as a BigQuery table
  or view. Each feature designates a column in the BigQuery
  data source.

- A BigQuery table or view directly associated with the feature view.

If a feature view is configured to use a dedicated service account, then the
details for that feature view also include the associated service account email
address. For more information about creating feature views with dedicated
service account configurations, see
[Configure the service account for a feature view](https://docs.cloud.google.com/gemini-enterprise-agent-platform/machine-learning/featurestore/latest/create-featureview.md.txt#serviceaccount).

## Before you begin


to
Gemini Enterprise Agent Platform, unless you've done so already.

Select the tab for how you plan to use the samples on this page:

### Console


When you use the Google Cloud console to access Google Cloud services and
APIs, you don't need to set up authentication.

### REST


To use the REST API samples on this page in a local development environment, you use the
credentials you provide to the gcloud CLI.

1. [Install](https://docs.cloud.google.com/sdk/docs/install) the Google Cloud CLI.
2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud.md.txt).


For more information, see
[Authenticate for using REST](https://docs.cloud.google.com/docs/authentication/rest.md.txt)
in the Google Cloud authentication documentation.

## List feature views in an online store

Use the following samples to retrieve a list of feature views created for an
online store in your project for a specific location.

### Console

Use the following instructions to view the list of feature views in an online store using the Google Cloud console.

1. In the Agent Platform section of the Google Cloud console, go
   to the **Feature Store** page.

   [Go to the Feature Store page](https://console.cloud.google.com/agent-platform/feature-store)
2. Click **Online store**.

3. Click the name of the online store to view its details on the **Online store details** page.

4. In the **Feature views** section, you can view the list of all the online stores for the selected location.

### REST


To retrieve a list of all the [`FeatureView`](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/projects.locations.featureOnlineStores.featureViews.md.txt#resource:-featureView) instances created within a specific online
store in your project, send a `GET` request by using the
[featureViews.list](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/projects.locations.featureOnlineStores.featureViews/list.md.txt)
method.


Before using any of the request data,
make the following replacements:

- <var translate="no">LOCATION_ID</var>: Region where the online store is located, such as `us-central1`.
- <var translate="no">PROJECT_ID</var>: Your project ID.
- <var translate="no">FEATUREONLINESTORE_NAME</var>: The name of the online store for which you want to view the list of feature views.


HTTP method and URL:

```
GET https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews
```

To send your request, choose one of these options:

#### curl

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs.md.txt), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


Execute the following command:

```
curl -X GET \
     -H "Authorization: Bearer $(gcloud auth print-access-token)" \
     "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews"
```

#### PowerShell

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


Execute the following command:

```
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
    -Method GET `
    -Headers $headers `
    -Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews" | Select-Object -Expand Content
```
You should receive a JSON response similar to the following. If any of the feature views listed in the response has a dedicated service account configuration, then the service account email address is also listed in its details. In this example, <var translate="no">SERVICE_ACCOUNT_EMAIL</var> is the service account email address associated with the feature view <var translate="no">FEATUREVIEW_NAME_1</var>.

```
{
  "featureViews": [
    {
      "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME_1",
      "createTime": "2023-09-06T23:46:49.936284Z",
      "updateTime": "2023-09-06T23:46:49.936284Z",
      "etag": "sample_etag",
      "featureRegistrySource": {
        "featureGroups": [
          {
            "featureGroupId": "FEATUREGROUP_ID",
            "featureIds": [
              "FEATURE_ID_1",
              "FEATURE_ID_2",
            ]
          }
        ]
      }
      "serviceAccountEmail": "SERVICE_ACCOUNT_EMAIL"
    },
    {
      "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME_2",
      "createTime": "2024-02-05T23:48:49.936284Z",
      "updateTime": "2024-02-05T23:48:49.936284Z",
      "etag": "sample_etag",
      "featureRegistrySource": {
        "featureGroups": [
          {
            "featureGroupId": "FEATUREGROUP_ID",
            "featureIds": [
              "FEATURE_ID_3",
              "FEATURE_ID_4",
            ]
          }
        ]
      }
    }
  ]
}
```

<br />

## What's next

- Learn how to [update a feature view](https://docs.cloud.google.com/gemini-enterprise-agent-platform/machine-learning/featurestore/latest/update-featureview.md.txt).

- Learn how to [delete a feature view](https://docs.cloud.google.com/gemini-enterprise-agent-platform/machine-learning/featurestore/latest/delete-featureview.md.txt).

- [Add more feature views](https://docs.cloud.google.com/gemini-enterprise-agent-platform/machine-learning/featurestore/latest/create-featureview.md.txt).