#!/usr/bin/env python # coding: utf-8 # # Using the HyP3 SDK to search for jobs run by another user # # To facilitate collaboration, HyP3 allows you to search for jobs run by other users. # # Follow [Using the HyP3 SDK for Python](https://nbviewer.jupyter.org/github/ASFHyP3/hyp3-sdk/blob/main/docs/sdk_example.ipynb) to install the `hyp3-sdk` package (version `2.1.1` or higher) and authenticate using your Earthdata credentials. # # Suppose you have run a number of RTC jobs with the name `rtc-example`. You can search for them using `find_jobs`: # In[ ]: from hyp3_sdk import HyP3 hyp3 = HyP3() my_rtc_jobs = hyp3.find_jobs(name='rtc-example') # Suppose that you are working with another user who has also run a number of RTC jobs with the same name. You can search for those jobs by providing the `user_id` parameter: # In[ ]: other_user_rtc_jobs = hyp3.find_jobs(name='rtc-example', user_id='other_user') # Or, suppose that the other user has run a number of InSAR jobs with the name `insar-example`: # In[ ]: other_user_insar_jobs = hyp3.find_jobs(name='insar-example', user_id='other_user') # You can provide the `user_id` parameter with any combination of other parameters supported by `find_jobs`. This allows you to search for jobs run by other users just as you would search for your own jobs. # # If the `user_id` parameter is not provided, jobs are returned for the currently authenticated user.