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

# Client.get_path_and_version_id()

> @overload\
>
> Client.get\_path\_and\_version\_id(\
>
>     *api\_name*: [str](https://docs.python.org/3/builtins/stdtypes.html#str),\
>
>     /,\
>
>     \*,\
>
>     *denied\_version\_ids*: [Set](https://docs.python.org/3/library/collections.abc.html#collections.abc.Set)\[[str](https://docs.python.org/3/builtins/stdtypes.html#str)] = `frozenset({})`,\
>
>     *path\_type*: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\['rest', 'ws'] = `'rest'`,\
>
> ) → [tuple](https://docs.python.org/3/builtins/stdtypes.html#tuple)\[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [str](https://docs.python.org/3/builtins/stdtypes.html#str)]

> @overload\
>
> Client.get\_path\_and\_version\_id(\
>
>     *api\_name*: [str](https://docs.python.org/3/builtins/stdtypes.html#str),\
>
>     /,\
>
>     \*,\
>
>     *allowed\_version\_ids*: [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)\[VersionIdT\_co],\
>
>     *denied\_version\_ids*: [Set](https://docs.python.org/3/library/collections.abc.html#collections.abc.Set)\[[str](https://docs.python.org/3/builtins/stdtypes.html#str)] = `frozenset({})`,\
>
>     *path\_type*: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\['rest', 'ws'] = `'rest'`,\
>
> ) → [tuple](https://docs.python.org/3/builtins/stdtypes.html#tuple)\[[str](https://docs.python.org/3/builtins/stdtypes.html#str), VersionIdT\_co]

Return the matching `(path, version_id)`.

If *allowed\_version\_ids* is not `None`, the server versions will be iterated following the order of its elements.

```pycon theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
>>> session.client.get_path_and_version_id("activeviam/pivot")
('activeviam/pivot/rest/v10', '10')
>>> session.client.get_path_and_version_id("activeviam/pivot", path_type="ws")
('activeviam/pivot/ws/v9', '9')
>>> session.client.get_path_and_version_id(
...     "activeviam/pivot", allowed_version_ids=["8", "9"]
... )
('activeviam/pivot/rest/v9', '9')
>>> session.client.get_path_and_version_id(
...     "activeviam/pivot", allowed_version_ids=["8", "7"]
... )
Traceback (most recent call last):
  ...
RuntimeError: None of the allowed version IDs ['8', '7'] match the provided ones: ['9', '10'].
>>> session.client.get_path_and_version_id(
...     "activeviam/pivot", denied_version_ids={"9", "10", "11"}
... )
Traceback (most recent call last):
  ...
RuntimeError: No `activeviam/pivot` API with `rest` path found.
```

### Parameters

#### *api\_name*

> [str](https://docs.python.org/3/builtins/stdtypes.html#str)

#### *denied\_version\_ids*

> [Set](https://docs.python.org/3/library/collections.abc.html#collections.abc.Set)\[[str](https://docs.python.org/3/builtins/stdtypes.html#str)]

#### *path\_type*

> [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\['rest', 'ws']

#### *allowed\_version\_ids*

> [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)\[VersionIdT\_co]

***

**See also**:
[`http_client`](./atoti.client.Client.http_client#atoti.Client.http_client) for an example of how this method can be used.
