{ "cells": [ { "cell_type": "markdown", "metadata": {}, "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`:" }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from hyp3_sdk import HyP3\n", "\n", "\n", "hyp3 = HyP3(prompt='password')\n", "my_rtc_jobs = hyp3.find_jobs(name='rtc-example')" ] }, { "cell_type": "markdown", "metadata": {}, "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:" }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "other_user_rtc_jobs = hyp3.find_jobs(name='rtc-example', user_id='other_user')" ] }, { "cell_type": "markdown", "metadata": {}, "source": "Or, suppose that the other user has run a number of InSAR jobs with the name `insar-example`:" }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "other_user_insar_jobs = hyp3.find_jobs(name='insar-example', user_id='other_user')" ] }, { "cell_type": "markdown", "metadata": {}, "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": { "kernelspec": { "display_name": "Python (Pyodide)", "language": "python", "name": "python" }, "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" } }, "nbformat": 4, "nbformat_minor": 4 }