@@ -34,7 +34,7 @@ def list_control_streams_of_system(server_addr: HttpUrl, system_id: str, api_roo
3434 .with_api_root (api_root )
3535 .for_resource_type (APITerms .SYSTEMS .value )
3636 .with_resource_id (system_id )
37- .for_resource_type (APITerms .CONTROL_STREAMS .value )
37+ .for_sub_resource_type (APITerms .CONTROL_STREAMS .value )
3838 .build_url_from_base ()
3939 .with_headers (headers )
4040 .with_request_method ('GET' )
@@ -83,7 +83,7 @@ def retrieve_control_stream_description_by_id(server_addr: HttpUrl, control_stre
8383
8484def update_control_stream_description_by_id (server_addr : HttpUrl , control_stream_id : str ,
8585 request_body : Union [str , dict ],
86- api_root : str = APITerms .API .value ):
86+ api_root : str = APITerms .API .value , headers : dict = None ):
8787 """
8888 Updates a control stream by its id
8989 :return:
@@ -95,9 +95,10 @@ def update_control_stream_description_by_id(server_addr: HttpUrl, control_stream
9595 .with_resource_id (control_stream_id )
9696 .with_request_body (request_body )
9797 .build_url_from_base ()
98+ .with_headers (headers )
99+ .with_request_method ('PUT' )
98100 .build ())
99- resp = requests .put (api_request .url , params = api_request .body , headers = api_request .headers )
100- return resp .json ()
101+ return api_request .make_request ()
101102
102103
103104def delete_control_stream_by_id (server_addr : HttpUrl , control_stream_id : str , api_root : str = APITerms .API .value ,
@@ -130,7 +131,7 @@ def retrieve_control_stream_schema_by_id(server_addr: HttpUrl, control_stream_id
130131 .with_api_root (api_root )
131132 .for_resource_type (APITerms .CONTROL_STREAMS .value )
132133 .with_resource_id (control_stream_id )
133- .for_resource_type (APITerms .SCHEMA .value )
134+ .for_sub_resource_type (APITerms .SCHEMA .value )
134135 .build_url_from_base ()
135136 .with_headers (headers )
136137 .with_request_method ('GET' )
@@ -139,7 +140,7 @@ def retrieve_control_stream_schema_by_id(server_addr: HttpUrl, control_stream_id
139140 return api_request .make_request ()
140141
141142
142- def update_control_stream_schema_by_id (server_addr : HttpUrl , control_stream_id : str , request_body : dict ,
143+ def update_control_stream_schema_by_id (server_addr : HttpUrl , control_stream_id : str , request_body : Union [ str , dict ] ,
143144 api_root : str = APITerms .API .value , headers : dict = None ):
144145 """
145146 Updates a control stream schema by its id
@@ -150,7 +151,7 @@ def update_control_stream_schema_by_id(server_addr: HttpUrl, control_stream_id:
150151 .with_api_root (api_root )
151152 .for_resource_type (APITerms .CONTROL_STREAMS .value )
152153 .with_resource_id (control_stream_id )
153- . for_resource_type (APITerms .SCHEMA .value )
154+ # .for_sub_resource_type (APITerms.SCHEMA.value)
154155 .with_request_body (request_body )
155156 .build_url_from_base ()
156157 .with_headers (headers )
0 commit comments