---
updatedAt: 2025-09-24T02:18:45.000Z
agentTools:
  projectIndex: https://docs.bigeye.com/llms.txt
---

# Get All Metrics from Workspace

```python Python
import bigeye_sdk.authentication.api_authentication as bigeye_auth
import bigeye_sdk.client.datawatch_client as bigeye_client
from bigeye_sdk.generated.com.bigeye.models.generated import MetricInfoList, GetSourceListResponse
import pandas as pd


def get_all_metrics():
    
    # authenticate with Bigeye either via credential file or via aws secret
    api_auth = bigeye_auth.ApiAuthConf.load_from_file('bigeye_cred_file.json')
    # api_auth = bigeye_auth.ApiAuthConf.load_cred_from_aws_secret(
    #	region_name='us-west-2',
    #  secret_name='bigeye-credentials'
    # )

    # establish an authenticated Bigeye client for requests
    client = bigeye_client.datawatch_client_factory(api_auth)

    # get list of source Ids that user has access to
    source_response: GetSourceListResponse = client.get_sources()
    source_ids = []
    for source in source_response.sources:
        source_ids.append(source.id)

    # get all metrics for all sources
    metrics_response: MetricInfoList = client.get_metric_info_batch_post(
      warehouse_ids=source_ids
    )
    metrics = []
    for metric in metrics_response.metrics:
        metrics.append({
            'metric_id': metric.metric_configuration.id,
            'schema_name': metric.metric_metadata.schema_name,
            'dataset_name':metric.metric_metadata.dataset_name,
            'column_name': metric.metric_metadata.field_name,
            'metric_name': metric.metric_configuration.name,
            'metric_type': metric.metric_metadata.statistic_name,
            'metric_description': metric.metric_configuration.description,
            'schedule_type': metric.metric_configuration.schedule_frequency.interval_type.name,
            'schedule_frequency': metric.metric_configuration.schedule_frequency.interval_value,
            'is_grouped_metric': len(metric.metric_configuration.group_bys) > 0,
            'is_table_metric': metric.metric_configuration.is_table_metric,
            'has_active_issue': metric.active_issue.id != 0,
            'status': metric.status.name
        })
    
    # convert metrics to a dataframe
    df = pd.DataFrame(metrics)
    
    return df


if __name__ == '__main__':
    get_all_metrics()
```

```json Response Example
pip install bigeye-sdk
```

# Import Bigeye SDK

<!-- python@1-4 -->

The Bigeye SDK can be installed through pip (pip install bigeye-sdk) and also is automatically installed if using our CLI (pip install bigeye-cli). There are several sub packages within our SDK than can be imported to help automate some Bigeye reporting tasks like getting all metrics from your workspace.

# Authenticate with Bigeye

<!-- python@9-17 -->

We offer two main authentication options in our SDK - (1) via a credential file or (2) via an AWS secret. Both options displayed here. Once that auth is established you can create a client that has access to several built in functions to interact with our API.

# Get all metrics in workspace

<!-- python@19-28 -->

First make a request through the client to get all data source ids that the authenticated user has access to. Then, use those source ids to request all metrics for the workspace.

# Clean the response

<!-- python@29-45 -->

Create a list of metrics that contain only the most relevant information that you would want to keep track of.

# Return a dataframe

<!-- python@47-50 -->

Convert that list of metrics into a pandas dataframe for easy analysis or loading metrics into a source destination.