@@ -653,6 +653,9 @@ def search(
653653 batch : bool = False ,
654654 batch_id : Optional [str ] = None ,
655655 fields : Optional [List [str ]] = None ,
656+ * ,
657+ annotation_job : Optional [bool ] = None ,
658+ annotation_job_id : Optional [str ] = None ,
656659 ):
657660 """
658661 Search for images in a project.
@@ -667,6 +670,8 @@ def search(
667670 in_dataset (str): dataset that an image must be in
668671 batch (bool): whether the image must be in a batch
669672 batch_id (str): batch id that an image must be in
673+ annotation_job (bool): whether the image must be in an annotation job
674+ annotation_job_id (str): annotation job id that an image must be in
670675 fields (list): fields to return in results (default: ["id", "created", "name", "labels"])
671676
672677 Returns:
@@ -684,7 +689,7 @@ def search(
684689 if fields is None :
685690 fields = ["id" , "created" , "name" , "labels" ]
686691
687- payload : Dict [str , Union [str , int , List [str ]]] = {}
692+ payload : Dict [str , Union [str , int , bool , List [str ]]] = {}
688693
689694 if like_image is not None :
690695 payload ["like_image" ] = like_image
@@ -713,6 +718,12 @@ def search(
713718 if batch_id is not None :
714719 payload ["batch_id" ] = batch_id
715720
721+ if annotation_job is not None :
722+ payload ["annotation_job" ] = annotation_job
723+
724+ if annotation_job_id is not None :
725+ payload ["annotation_job_id" ] = annotation_job_id
726+
716727 payload ["fields" ] = fields
717728
718729 data = requests .post (
@@ -734,6 +745,9 @@ def search_all(
734745 batch : bool = False ,
735746 batch_id : Optional [str ] = None ,
736747 fields : Optional [List [str ]] = None ,
748+ * ,
749+ annotation_job : Optional [bool ] = None ,
750+ annotation_job_id : Optional [str ] = None ,
737751 ):
738752 """
739753 Create a paginated list of search results for use in searching the images in a project.
@@ -748,6 +762,8 @@ def search_all(
748762 in_dataset (str): dataset that an image must be in
749763 batch (bool): whether the image must be in a batch
750764 batch_id (str): batch id that an image must be in
765+ annotation_job (bool): whether the image must be in an annotation job
766+ annotation_job_id (str): annotation job id that an image must be in
751767 fields (list): fields to return in results (default: ["id", "created", "name", "labels"])
752768
753769 Returns:
@@ -781,6 +797,8 @@ def search_all(
781797 batch = batch ,
782798 batch_id = batch_id ,
783799 fields = fields ,
800+ annotation_job = annotation_job ,
801+ annotation_job_id = annotation_job_id ,
784802 )
785803
786804 yield data
0 commit comments