@@ -43,6 +43,9 @@ class RegisterDatasetRequest(BaseModel):
4343 full_feature_names : bool = False
4444 feature_service_name : Optional [str ] = None
4545 allow_override : bool = False
46+ namespace : str = ""
47+ collection : str = ""
48+ description : str = ""
4649
4750
4851class CreateDatasetRequest (BaseModel ):
@@ -75,10 +78,22 @@ def list_saved_datasets_all(
7578 limit : int = Query (50 , ge = 1 , le = 100 ),
7679 sort_by : str = Query (None ),
7780 sort_order : str = Query ("asc" ),
81+ namespace : Optional [str ] = Query (
82+ None , description = "Filter by namespace (logical grouping)"
83+ ),
84+ collection : Optional [str ] = Query (
85+ None , description = "Filter by collection (sub-grouping within namespace)"
86+ ),
7887 include_relationships : bool = Query (
7988 False , description = "Include relationships for each saved dataset"
8089 ),
8190 ):
91+ extra_params = {}
92+ if namespace is not None :
93+ extra_params ["namespace" ] = namespace
94+ if collection is not None :
95+ extra_params ["collection" ] = collection
96+
8297 return aggregate_across_projects (
8398 grpc_handler = grpc_handler ,
8499 list_method = grpc_handler .ListSavedDatasets ,
@@ -91,6 +106,7 @@ def list_saved_datasets_all(
91106 sort_by = sort_by ,
92107 sort_order = sort_order ,
93108 include_relationships = include_relationships ,
109+ extra_request_params = extra_params or None ,
94110 )
95111
96112 @router .get ("/saved_datasets/data/{name}" )
@@ -230,6 +246,12 @@ def list_saved_datasets(
230246 project : str = Query (...),
231247 allow_cache : bool = Query (default = True ),
232248 tags : Dict [str , str ] = Depends (parse_tags ),
249+ namespace : Optional [str ] = Query (
250+ None , description = "Filter by namespace (logical grouping)"
251+ ),
252+ collection : Optional [str ] = Query (
253+ None , description = "Filter by collection (sub-grouping within namespace)"
254+ ),
233255 include_relationships : bool = Query (
234256 False , description = "Include relationships for each saved dataset"
235257 ),
@@ -240,6 +262,8 @@ def list_saved_datasets(
240262 project = project ,
241263 allow_cache = allow_cache ,
242264 tags = tags ,
265+ namespace = namespace or "" ,
266+ collection = collection or "" ,
243267 pagination = create_grpc_pagination_params (pagination_params ),
244268 sorting = create_grpc_sorting_params (sorting_params ),
245269 )
@@ -347,6 +371,9 @@ def register_saved_dataset(payload: RegisterDatasetRequest = Body(...)):
347371 full_feature_names = payload .full_feature_names ,
348372 storage = storage_proto ,
349373 tags = payload .tags ,
374+ namespace = payload .namespace ,
375+ collection = payload .collection ,
376+ description = payload .description ,
350377 )
351378 if payload .feature_service_name :
352379 spec .feature_service_name = payload .feature_service_name
0 commit comments