{ "metadata": { "language_info": { "codemirror_mode": { "name": "python", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8" }, "kernelspec": { "name": "python", "display_name": "Python (Pyodide)", "language": "python" } }, "nbformat_minor": 4, "nbformat": 4, "cells": [ { "cell_type": "markdown", "source": "# Using the HyP3 SDK to search for jobs run by another user\n\nTo facilitate collaboration, HyP3 allows you to search for jobs run by other users.\n\nFollow [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.\n\nSuppose you have run a number of RTC jobs with the name `rtc-example`. You can search for them using `find_jobs`:", "metadata": {} }, { "cell_type": "code", "source": "from hyp3_sdk import HyP3\nhyp3 = HyP3()\nmy_rtc_jobs = hyp3.find_jobs(name='rtc-example')", "metadata": {}, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": "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:", "metadata": {} }, { "cell_type": "code", "source": "other_user_rtc_jobs = hyp3.find_jobs(name='rtc-example', user_id='other_user')", "metadata": {}, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": "Or, suppose that the other user has run a number of InSAR jobs with the name `insar-example`:", "metadata": {} }, { "cell_type": "code", "source": "other_user_insar_jobs = hyp3.find_jobs(name='insar-example', user_id='other_user')", "metadata": {}, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": "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.\n\nIf the `user_id` parameter is not provided, jobs are returned for the currently authenticated user.", "metadata": {} } ] }