aip_sdk.list_test_plans
aip_sdk.list_test_plans(*, workspace_id: str | None = None, page: int = 1, per_page: int = 20, client: APIClient | None = None) -> TestPlanPage
List the test plans in a workspace, each at its latest published version, by name.
One row per methodology rather than one per publish, so a plan edited fifty times still
reads as one entry. Reach an older version through list_test_plan_versions.
A listing does not derive required_columns or unresolved_metrics — that costs a
catalogue lookup per row — so it returns TestPlanSummary rows, which do not carry either
field. Call get_test_plan for the version you care about.
Parameters
workspace_idstr | None: Workspace to list from. Falls back to the client's configured workspace.pageint: 1-based page number.per_pageint: Rows per page (1-100).clientAPIClient | None: Explicit API client. Uses the default client when omitted.
Returns
TestPlanPage: ATestPlanPage—recordsare the plans on this page only, up toper_pageofTestPlanPage: them, not every plan in the workspace;totalis how many exist behind every page,TestPlanPage: letting a manual pager know when to stop. Useiter_test_plansto walk them all withoutTestPlanPage: tracking that yourself. A page shorter thanper_page— even an empty one — is neverTestPlanPage: proof the listing has ended: you may have paged past the end, or the platform had aTestPlanPage: stored row it could not return this time while still counting it intotal. CompareTestPlanPage: againsttotal, notlen(records).
Raises
NoWorkspaceSelectedError: No workspace was given and the client has none configured.InvalidArgumentError:page/per_pageis out of range.AuthError: Credentials are missing, invalid, or expired.ForbiddenError: The caller is not a member of the workspace.NotFoundError: The workspace does not exist. A workspace that exists but holds no plans returns an empty page instead.ResponseParseError: A platform response did not match the shape this SDK version expects. Usually means the platform is running a newer release; upgrading resolves it.APIError: Any other error from the platform.
Examples
import aip_sdk as aip
page = aip.list_test_plans(workspace_id="ws_001")
for summary in page:
print(summary.name, "v", summary.version, sorted(summary.plan.metrics))