Skip to content

tab_list

Asynchronously list tabs, optionally restricted to one workspace.

List tabs, optionally limited to one workspace.

Parameters:

Name Type Description Default
workspace_id str | None

Workspace identifier to filter by, or None for all workspaces.

None

Returns:

Type Description
TabListResult

A schema-derived tab list result.

Example
client = AsyncHerdrClient()
result = await client.tab_list(workspace_id="main")
print(result["tabs"])
Source code in src/herdr_client/async_client/client.py
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
async def tab_list(self, workspace_id: str | None = None) -> TabListResult:
    """List tabs, optionally limited to one workspace.

    Args:
        workspace_id: Workspace identifier to filter by, or ``None`` for all
            workspaces.

    Returns:
        A schema-derived tab list result.

    Example:
        ```python
        client = AsyncHerdrClient()
        result = await client.tab_list(workspace_id="main")
        print(result["tabs"])
        ```
    """
    params: TabListParams = {}
    if workspace_id is not None:
        params["workspace_id"] = workspace_id
    return await self.request("tab.list", params)