@@ -159,51 +159,57 @@ async def get_entities(
159159 )
160160
161161@retrieve_router .get (path = "/structured-data/types" )
162- async def get_structured_data_types ():
162+ async def get_structured_data_types (
163+ brain_id : str = "default" ,
164+ ):
163165 """
164166 Get all unique types from structured data.
165167 """
166- return await get_structured_data_types_controller ()
168+ return await get_structured_data_types_controller (brain_id )
167169
168170@retrieve_router .get (path = "/structured-data/{id}" )
169171async def get_structured_data_by_id (
170172 id : str ,
173+ brain_id : str = "default" ,
171174):
172175 """
173176 Get structured data by ID.
174177 """
175- return await get_structured_data_by_id_controller (id )
178+ return await get_structured_data_by_id_controller (id , brain_id )
176179
177180@retrieve_router .get (path = "/structured-data" )
178181async def get_structured_data_list (
179182 limit : int = 10 ,
180183 skip : int = 0 ,
181184 types : Optional [str ] = None ,
182185 query_text : Optional [str ] = None ,
186+ brain_id : str = "default" ,
183187):
184188 """
185189 Get a list of structured data.
186190 """
187191 if types :
188192 types = types .split ("," )
189- return await get_structured_data_list_controller (limit , skip , types , query_text )
193+ return await get_structured_data_list_controller (limit , skip , types , query_text , brain_id )
190194
191195@retrieve_router .get (path = "/observations/labels" )
192- async def get_observation_labels ():
196+ async def get_observation_labels (
197+ brain_id : str = "default" ,
198+ ):
193199 """
194200 Get all unique labels from observations.
195201 """
196- return await get_observation_labels_controller ()
202+ return await get_observation_labels_controller (brain_id )
197203
198204@retrieve_router .get (path = "/observations/{id}" )
199205async def get_observation_by_id (
200206 id : str ,
207+ brain_id : str = "default" ,
201208):
202209 """
203210 Get observation by ID.
204211 """
205- return await get_observation_by_id_controller (id )
206-
212+ return await get_observation_by_id_controller (id , brain_id )
207213
208214@retrieve_router .get (path = "/observations" )
209215async def get_observations_list (
@@ -212,10 +218,11 @@ async def get_observations_list(
212218 resource_id : Optional [str ] = None ,
213219 labels : Optional [str ] = None ,
214220 query_text : Optional [str ] = None ,
221+ brain_id : str = "default" ,
215222):
216223 """
217224 Get a list of observations.
218225 """
219226 if labels :
220227 labels = labels .split ("," )
221- return await get_observations_list_controller (limit , skip , resource_id , labels , query_text )
228+ return await get_observations_list_controller (limit , skip , resource_id , labels , query_text , brain_id )
0 commit comments