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

Part 4: Allow job start to return 202 instead of 200 #461

Open
fmigneault opened this issue Oct 22, 2024 · 0 comments
Open

Part 4: Allow job start to return 202 instead of 200 #461

fmigneault opened this issue Oct 22, 2024 · 0 comments
Labels
Part 4 (Job Management) OGC API - Processes - Part 4: Job Management

Comments

@fmigneault
Copy link
Contributor

Referring to this requirement:

https://github.com/opengeospatial/ogcapi-processes/blob/02627da57ab4782fdf41d8e8f421dd3c9b422eb6/extensions/job_management/standard/requirements/job-management/start/REQ_response.adoc?plain=1#L6C1-L6C110

When a job is pending execution with status: created, and that POST /jobs/{jobId}/results is requested to trigger its execution, an implementation can still choose this "trigger" to simply consist of placing the job in queue for processing (as if it was directly submitted originally by Prefer: respond-async).

Therefore, even if the execution trigger was acknowledged, it might still not have been performed "yet", due to pending resources acquisition or other prerequisites. For this reason, a server might prefer to highlight this situation using HTTP 202 Accepted rather than "HTTP 200 OK". The HTTP 200 OK can give the wrong impression that resources (i.e.: GET /jobs/{jobId}/results) would now be available, when in fact they are almost certainly not yet ready for a long processing graph/workflow.

See #451 (comment) for details about the execution modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Part 4 (Job Management) OGC API - Processes - Part 4: Job Management
Projects
None yet
Development

No branches or pull requests

2 participants