Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include job URLs in post_jobs response #1273

Open
jtherrmann opened this issue Oct 17, 2022 · 2 comments
Open

Include job URLs in post_jobs response #1273

jtherrmann opened this issue Oct 17, 2022 · 2 comments

Comments

@jtherrmann
Copy link
Contributor

jtherrmann commented Oct 17, 2022

I want the response for the hyp3 API's post_jobs endpoint to include the API URL for each job, e.g. https://hyp3-test-api.asf.alaska.edu/jobs/4bcb674a-02b1-49d4-98e0-e97aa3249067. This could be a field of the job dict but it would be even more convenient to have a job_urls field as the first key in the response dict with a corresponding value which is a list of the job URLs. Then, when submitting a batch of sample jobs, I could just download the response, open the JSON file in my browser (which conveniently detects URLs in JSON and displays them as hyperlinks), and click each link to open all of the jobs, or just copy-paste the list of URLs to somewhere that other members of the team can view it.

Even more convenient would be if we could get the Swagger UI to include a button to open the JSON response in the browser rather than having to first download it and then open it.

@jtherrmann
Copy link
Contributor Author

Here is the post_jobs handler.

@jtherrmann
Copy link
Contributor Author

And here is where the response gets serialized to JSON, which would be where we determine the dict key order to ensure that job_urls is the first key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant