> ## 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 Version By Name

> Retrieve a specific version by its name.

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

## Returns

Returns a [Version](https://docs.galtea.ai/v5.12/concepts/product/version.md) object for the given product and version name.

## Example

```python theme={"system"}
version = galtea.versions.get_by_name(product_id=product_id, version_name=child_version_name)
```

## Parameters

**product\_id** `string` *required*

The ID of the product for which you want to retrieve the version.

**version\_name** `string` *required*

The name of the version you want to retrieve.

## Errors

| Error | Cause |
| - | - |
| `EntityNotFoundException` | No version in the product carries that name. Import it with `from galtea import EntityNotFoundException`. |
| `AmbiguousVersionNameException` | More than one version in the product carries that name. |

> [!NOTE]
>
> A name does not always identify one version. A version created before version numbers existed can carry a name such as `v5`, and the product's fifth version is stored under the same label. Both then answer to `v5`.
>
> Import `AmbiguousVersionNameException` from `galtea`. Its message lists the ID of each match, and each match's number where the deployment has one. Pick one match and call [`galtea.versions.get`](https://docs.galtea.ai/v5.12/sdk/api/version/get) with its ID.


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