> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieving Metric By Name

> Retrieve a specific metric by its name.

> [!WARNING]
>
> You are reading the docs of Galtea 5.11. [Read this page in the latest version](https://docs.galtea.ai/sdk/api/metric/get-by-name.md).

## Returns

Returns a [Metric](https://docs.galtea.ai/v5.11/concepts/metric.md) object for the given metric name.

## Example

```python theme={"system"}
metric = galtea.metrics.get_by_name(name=metric_name)
```

## Parameters

**name** `string` *required*

The name of the metric you want to retrieve.

## Errors

| Error | Cause |
| - | - |
| `EntityNotFoundException` | The platform holds nothing under the id or name you passed. Import it with `from galtea import EntityNotFoundException`. Read the status from `e.status_code`. When the API answered 404 the SDK raises the subclass `EntityNotFoundHTTPError`, which also derives from `requests.HTTPError` and carries `e.response`, so code catching `requests.HTTPError` keeps working. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.