CatalogWorkspaceContentService.

get_label_elements

get_label_elements( workspace_id: str, label_id: str, depends_on: Optional[list[DependsOnItem]], validate_by: Optional[list[CatalogValidateByItem]], exact_filter: Optional[list[str]], filter_by: Optional[CatalogFilterBy], pattern_filter: Optional[str], complement_filter: Optional[bool], sort_order: Optional[Literal["ASC", "DESC"]], offset: Optional[int], limit: Optional[int] ) -> list[str]

Get existing values for a label.

Under-the-hood, it basically executes SELECT DISTINCT from corresponding table. Values are automatically sorted lexicographically.

Parameters

nametypedescription
workspace_idstrWorkspace identification string e.g. "demo".
label_idstrLabel ID. We support string or ObjId types. String may not contain "label/" prefix, we append it if necessary.
depends_onOptional[list[DependsOnItem]]Optional parameter specifying dependencies on other labels or date filters.
validate_byOptional[list[CatalogValidateByItem]]Optional parameter specifying validation metrics, attributes, labels or facts.
exact_filterOptional[list[str]]Optional parameter specifying exact filter values.
filter_byOptional[CatalogFilterBy]Optional parameter specifying which label is used for filtering - primary or requested. If omitted the server will use the default value of "REQUESTED"
pattern_filterOptional[str]Optional parameter specifying pattern filter: matching the elements using case-insensitive substring match.
complement_filterOptional[bool]Optional parameter specifying whether to negate the filter in exact_filter and pattern_filter.
sort_orderOptional[Literal["ASC", "DESC"]]Optional parameter specifying the sort order for the returned values.
offsetOptional[int]Optional parameter specifying the offset for the returned values.
limitOptional[int]Optional parameter specifying the limit for the returned values.

Returns

typedescription
list of label values