@@ -617,6 +617,17 @@ def job_stop(self, job_id: str, commit_results: bool = True):
617
617
response = self .request_manager .post (url , json = request )
618
618
return response
619
619
620
+ def jobs_list (self , project_id : str , page_size = None ):
621
+ """
622
+ Lists job history for a given project_id
623
+ :param project_id: The project to query
624
+ :param page_size: The number of jobs to return (default: 3)
625
+ :return: The details
626
+ """
627
+ url = self ._routes .jobs_list (project_id , page_size )
628
+ return self ._get (url )
629
+
630
+
620
631
def job_status (self , job_id : str ) -> dict :
621
632
"""
622
633
Gets the status of job with given job_id
@@ -625,6 +636,24 @@ def job_status(self, job_id: str) -> dict:
625
636
"""
626
637
return self .request_manager .get (self ._routes .job_status (job_id )).json ()
627
638
639
+ def job_restart (
640
+ self ,
641
+ job_id :str ,
642
+ should_use_original_input_commit : bool = True
643
+ ):
644
+ """
645
+ Restarts a previous job
646
+ :param job_id: ID of the original job that should be restarted
647
+ :param should_use_original_input_commit: Should the new job run use the original code, or the current version?
648
+ """
649
+ url = self ._routes .job_restart ()
650
+ request = {
651
+ "jobId" : job_id ,
652
+ "shouldUseOriginalInputCommit" : should_use_original_input_commit
653
+ }
654
+ response = self .request_manager .post (url , json = request )
655
+ return response
656
+
628
657
def job_runtime_execution_details (self , job_id : str ) -> dict :
629
658
"""
630
659
Gets the runtime execution details of job with given job_id
0 commit comments