aip_sdk.iter_metric_configs
aip_sdk.iter_metric_configs(*, workspace_id: str | None = None, config_name: str | None = None, metric_name: str | None = None, per_page: int = 100, client: APIClient | None = None, include_global: bool | None = None, all_workspaces: bool = False) -> Iterator[MetricConfigSummary]
Iterate every metric config visible to the caller, auto-paginating.
Reads your session's workspace unless you name one, and raises if none is set.
Pass all_workspaces=True to read across every workspace you can access.
Parameters
workspace_idstr | None: Only configs owned by this workspace. Omitting it iterates your session's workspace, and raises if none is set.config_namestr | None: Filter by configuration name.metric_namestr | None: Filter by the metric implementation configured.per_pageint: Page size used internally for each request (1-100).clientAPIClient | None: Optional pre-configured API client.include_globalbool | None: Deprecated and ignored — there is no more platform-wide scope to include, every config is workspace-owned. Passing any value (includingFalse) emits aDeprecationWarning. Will be removed in a future release.all_workspacesbool: Read across every workspace you can access.
Yields
MetricConfigSummaryMetricConfigSummary: each matching config, across as many pages as needed. Not aMetricConfigSummary: point-in-time snapshot — a config created or deleted mid-iteration can shift rowsMetricConfigSummary: across page boundaries.
Raises
InvalidArgumentError: Ifper_pageis out of range.AuthError: If credentials are missing or invalid.ForbiddenError: Ifworkspace_idnames a workspace the caller cannot access.APIError: If a listing request returns a malformed response.InvalidArgumentError: If bothworkspace_idandall_workspacesare given.NoWorkspaceSelectedError: No workspace was passed, none is configured for the session, andall_workspaceswas not set. Raised at this call, before any request.
Example:
names = [c.config_name for c in aip.iter_metric_configs(metric_name="agent.custom_judge_rubric")]