> ## 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.

# atoti.Client.get_path_and_version_id()

#### Client.get\_path\_and\_version\_id(api\_name: [str](https://docs.python.org/3/library/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/library/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/library/stdtypes.html#tuple)\[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str)]

#### Client.get\_path\_and\_version\_id(api\_name: [str](https://docs.python.org/3/library/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/library/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/library/stdtypes.html#tuple)\[[str](https://docs.python.org/3/library/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.

### Example

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/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", "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.
```

<Callout icon="link">
  **See also**:
  [`http_client`](./atoti.Client.http_client#atoti.Client.http_client) for an example of how this method can be used.
</Callout>
