@@ -2683,9 +2683,20 @@ def create_validation(self, *, metadata: Optional[dict] = None, **optional_args)
2683
2683
body .update (** optional_args )
2684
2684
return self ._make_request (requests .post , '/validations' , body = body )
2685
2685
2686
- def create_validation_task (self , validation_id : str , * , metadata : Optional [dict ] = None , ** optional_args ) -> Dict :
2686
+ def create_validation_task (
2687
+ self ,
2688
+ validation_id : str ,
2689
+ input : dict ,
2690
+ * ,
2691
+ metadata : Optional [dict ] = None ,
2692
+ ** optional_args ,
2693
+ ) -> Dict :
2687
2694
"""Creates a validation, calls the POST /validations endpoint.
2688
2695
2696
+ :param validation_id: Id of the validation
2697
+ :type validation_id: str
2698
+ :param input: Dictionary that can be used to store additional information
2699
+ :type input: dict, optional
2689
2700
:param name: Name of the validation
2690
2701
:type name: str, optional
2691
2702
:param description: Description of the validation
@@ -2698,6 +2709,43 @@ def create_validation_task(self, validation_id: str, *, metadata: Optional[dict]
2698
2709
:raises: :py:class:`~las.InvalidCredentialsException`, :py:class:`~las.TooManyRequestsException`,\
2699
2710
:py:class:`~las.LimitExceededException`, :py:class:`requests.exception.RequestException`
2700
2711
"""
2701
- body = dictstrip ({'metadata' : metadata })
2712
+ body = dictstrip ({'input' : input , ' metadata' : metadata })
2702
2713
body .update (** optional_args )
2703
2714
return self ._make_request (requests .post , f'/validations/{ validation_id } /tasks' , body = body )
2715
+
2716
+ def update_validation_task (
2717
+ self ,
2718
+ validation_id : str ,
2719
+ validation_task_id : str ,
2720
+ output : dict ,
2721
+ * ,
2722
+ metadata : Optional [dict ] = None ,
2723
+ ** optional_args ,
2724
+ ) -> Dict :
2725
+ """Creates a validation, calls the POST /validations endpoint.
2726
+
2727
+ :param validation_id: Id of the validation
2728
+ :type validation_id: str
2729
+ :param validation_task_id: Id of the validation task
2730
+ :type validation_task_id: str
2731
+ :param output: Dictionary that can be used to store additional information
2732
+ :type output: dict, optional
2733
+ :param name: Name of the validation
2734
+ :type name: str, optional
2735
+ :param description: Description of the validation
2736
+ :type description: str, optional
2737
+ :param metadata: Dictionary that can be used to store additional information
2738
+ :type metadata: dict, optional
2739
+ :return: Dataset response from REST API
2740
+ :rtype: dict
2741
+
2742
+ :raises: :py:class:`~las.InvalidCredentialsException`, :py:class:`~las.TooManyRequestsException`,\
2743
+ :py:class:`~las.LimitExceededException`, :py:class:`requests.exception.RequestException`
2744
+ """
2745
+ body = dictstrip ({'output' : output , 'metadata' : metadata })
2746
+ body .update (** optional_args )
2747
+ return self ._make_request (
2748
+ requests_fn = requests .patch ,
2749
+ path = f'/validations/{ validation_id } /tasks/{ validation_task_id } ' ,
2750
+ body = body ,
2751
+ )
0 commit comments