-
Notifications
You must be signed in to change notification settings - Fork 45
Add support for the /jobs/{jobId}/results/{outputID}/{N} path. #596
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [[per_core_job-results-async-one-multi-valued-other-formats]] | ||
| [permission] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /per/core/job-results-async-one-multi-valued-other-formats | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is asynchronous. | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . In the <<sc_process_description,process description>> the output is defined as having `maxOccurs>1`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| Servers MAY support other response formats or encodings (e.g. ZIP or `multipart/*`) that do not conform to https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/values.yaml[values.yaml]. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| This Standard does not provide any guidance on these other formats or encodings. | ||
| -- | ||
|
|
||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [[per_core_process-execute-multiple-values-pkg]] | ||
| [permission] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /per/core/process-execute-multiple-values-pkg | ||
|
|
||
| A server MAY, through content negotiation, respond with something other than that specified by requirement <<req_core_process-execute-sync-one-multi-valued-json,/req/core/process-execute-sync-one-multi-valued-json>>. A server MAY, for example, respond with a https://www.iso.org/standard/60101.html[ZIP] file or a https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html[multi-part MIME] document containing all the requested output values. | ||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [[per_core_process-execute-sync-one-multi-valued-other-formats]] | ||
| [permission] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /per/core/process-execute-sync-one-multi-valued-other-formats | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is synchronous. | ||
| . The number of requested (whether <<implicit-explicit-outputs,implicitly or explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . In the <<sc_process_description,process description>> the requested output is defined as having `maxOccurs>1`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| Servers MAY support other response formats or encodings (e.g. ZIP or `multipart/*`) that do not conform to https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/values.yaml[values.yaml]. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| This Standard does not provide any guidance on these other formats or encodings. | ||
| -- | ||
|
|
||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [[rec_core_job-results-async-one-multi-valued-json-prefer-minimal]] | ||
| [recommendation] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /rec/core/job-results-async-one-multi-valued-json-prefer-minimal | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is asynchronous. | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . In the <<sc_process_description,process description>> the output is defined as having `maxOccurs>1`. | ||
| . The negotiated https://datatracker.ietf.org/doc/html/rfc7240#section-4.2[return preference] is `minimal`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| If the server deems that the size of an output value is _small_, that value SHOULD be included in-line in the response. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| If the server deems that the size of an output value is _large_, that value SHOULD be included by reference via hyperlink in the response. | ||
| -- | ||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [[rec_core_job-results-async-one-multi-valued-json-prefer-none]] | ||
| [recommendation] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /rec/core/job-results-async-one-multi-valued-json-prefer-none | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is asynchronous. | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . In the <<sc_process_description,process description>> the output is defined as having `maxOccurs>1`. | ||
| . A return preference is _**not**_ specified via the HTTP https://datatracker.ietf.org/doc/html/rfc7240#section-4.2[`prefer`] header. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| If the server deems that the size of an output value is _small_, that value SHOULD be included in-line in the response. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| If the server deems that the size of an output value is _large_, that value SHOULD be included by reference via hyperlink in the response. | ||
| -- | ||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| [[rec_core_job-results-async-one-multi-valued-json-prefer-representation]] | ||
| [recommendation] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /rec/core/job-results-async-one-multi-valued-json-prefer-representation | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is asynchronous. | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . In the <<sc_process_description,process description>> the output is defined as having `maxOccurs>1`. | ||
| . The negotiated https://datatracker.ietf.org/doc/html/rfc7240#section-4.2[return preference] is `representation`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| Each requested output value SHOULD be included in-line in the response. | ||
| -- | ||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [[rec_core_process-execute-sync-one-multi-valued-json-prefer-minimal]] | ||
| [recommendation] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /rec/core/process-execute-sync-one-multi-valued-json-prefer-minimal | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is synchronous. | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . In the <<sc_process_description,process description>> the output is defined as having `maxOccurs>1`. | ||
| . The negotiated https://datatracker.ietf.org/doc/html/rfc7240#section-4.2[return preference] is `minimal`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| If the server deems that the size of an output value is _small_, that value SHOULD be included in-line in the response. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| If the server deems that the size of an output value is _large_, that value SHOULD be included by reference via hyperlink in the response. | ||
| -- | ||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [[rec_core_process-execute-sync-one-multi-valued-json-prefer-none]] | ||
| [recommendation] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /rec/core/process-execute-sync-one-multi-valued-json-prefer-none | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is synchronous. | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . In the <<sc_process_description,process description>> the output is defined as having `maxOccurs>1`. | ||
| . No https://datatracker.ietf.org/doc/html/rfc7240#section-4.2[return preference] accompanies the request. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| If the server deems that the size of the output values is _small_, that value SHOULD be included in-line in the response. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| If the server deems that the size of an output values is _large_, that value SHOULD be included by reference via hyperlink in the response. | ||
| -- | ||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| [[rec_core_process-execute-sync-one-multi-valued-json-prefer-representation]] | ||
| [recommendation] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /rec/core/process-execute-sync-one-multi-valued-json-prefer-representation | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is synchronous. | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . In the <<sc_process_description,process description>> the output is defined as having `maxOccurs>1`. | ||
| . The negotiated https://datatracker.ietf.org/doc/html/rfc7240#section-4.2[return preference] is `representation`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| Each requested output value SHOULD be included in-line in the response. | ||
| -- | ||
| ==== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [[req_core_job-result-op-0th]] | ||
| [requirement] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /req/core/job-result-op-0th | ||
|
|
||
| For each output, with output identifier `outputID`, defined in the <<sc_process_description,description of a process>> and requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) in an <<execute-request-body,execute request>>, the server SHALL support the HTTP GET operation at the path `/jobs/{jobID}/results/{outputID}/0`. | ||
| ==== | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [[req_core_job-result-op-Nth]] | ||
| [requirement] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /req/core/job-result-op-Nth | ||
|
|
||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The output with output identifier `outputID` is defined in the <<sc_process_description,process description>> as having `maxOccurs>1`. | ||
| . The output with output identifier `outputID` is <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>> requested in an <<execute-request-body,execute request>>. | ||
|
Comment on lines
+10
to
+11
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The server SHALL support the HTTP GET operation at the path `/jobs/{jobID}/results/{outputID}/{N}`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The path element _N_ is a 0-based index into the array of values generated by the process for this output. | ||
| -- | ||
|
|
||
| ==== | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| [[req_core_job-results-async-one-Nth]] | ||
| [requirement] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /req/core/job-results-async-one-Nth | ||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is asynchronous, | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
| . The requested output with identifier `outputID` is defined in the <<sc_process_description,process description>> as having `maxOccurs>1`. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| . The path `/jobs/{jobID}/results/{outputID}/{N}` is accessed to retrieve the 0-based _N^th^_ value from the array of values produced for this output. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The server SHALL respond with an HTTP status code of 200. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| In the response headers, the server SHALL include an HTTP header named `OGC-Output-Values-Count` indicating how many processing values are retrievable for this output. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The media type of the response SHALL be as negotiated as per the https://datatracker.ietf.org/doc/html/rfc2616#section-12[HTTP content negotiation rules]. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The content of the response body SHALL be the 0-based _N^th^_ value in the negotiated output format. | ||
| -- | ||
|
|
||
| ==== | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [[req_core_job-results-async-one-multi-valued]] | ||
| [requirement] | ||
| ==== | ||
| [%metadata] | ||
| identifier:: /req/core/job-results-async-one-multi-valued | ||
|
Comment on lines
+1
to
+5
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This applies to all requriements about "N". Is it necessary to make them async-specific? Technically, a server is still allowed to create a job in sync to preserve traceability ( |
||
|
|
||
| [.component,class=conditions] | ||
| -- | ||
| . The <<sc_execution_mode,negotiated execution mode>> is asynchronous. | ||
| . The number of requested (whether <<implicit-process-output,implicitly>> or <<explicit-process-output,explicitly>>) outputs in the <<execute-request-body,execute request>> is 1. | ||
|
Comment on lines
+5
to
+10
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this case (and same for sync case), it seems like the "number of requested outputs" should not matter (or at least, be >=1) since the |
||
| - In its <<sc_process_description,process description>> the requested output is defined as having `maxOccurs>1`. | ||
| . The results are retrieved from the `/jobs/{jobID}/results/{outputID}` endpoint. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The server SHALL respond with an HTTP status code of 200. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| In the response headers, the server SHALL include an HTTP header named `OGC-Output-Values-Count` indicating how many processing values are retrievable for this output. | ||
| -- | ||
|
Comment on lines
+20
to
+23
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This header should probably be prefixed by a |
||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The media type of the response SHALL be `application/json`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The response HTTP headers SHALL include a `Link: href="https://www.opengis.net/def/profile/OGC/0/ogc-values", rel="profile"`. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The content of response SHALL conform to the <<schema_values,values.yaml>> schema. | ||
| -- | ||
|
|
||
| ==== | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,11 @@ identifier:: /req/core/job-results-async-one | |
| The server SHALL respond with an HTTP status code of 200. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| In the response headers, the server SHALL include an HTTP header named `OGC-Output-Values-Count` indicating how many processing values are retrievable for this output. | ||
| -- | ||
|
|
||
| [.component,class=part] | ||
| -- | ||
| The media type of the response SHALL be as negotiated as per the https://datatracker.ietf.org/doc/html/rfc2616#section-12[HTTP content negotiation rules]. | ||
|
|
@@ -27,3 +32,8 @@ The content of response body SHALL be the requested process output value in the | |
| -- | ||
|
|
||
| ==== | ||
|
|
||
| NOTE: Unless the definition of an output sets `maxOccurs>1`, the value of the `OGC-Output-Values-Count` HTTP header will usually be 1. | ||
|
|
||
| NOTE: If the requested output is multi-valued (i.e. `maxOccurs>1` in the <<sc_process_description,process description>>), then the negotiated response will need to be some type of container for the array of values generated by the process for this output. For example, this could be a JSON response where the array of values is encoded as a JSON array or a multi-part response where each part contains one value from the array or some archive (e.g. ZIP or tar) where each array value is stored in an individual file. | ||
|
Comment on lines
+36
to
+38
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be worth moving this out (and the corresponding part about it above) into a dedicated I am worried that an actual JSON "array-like value" might be incorrectly accessed at index 0 if a client relies on This concern is partially discussed in the 'The "0-th" result' section, but it might be a bit far from where this requirement is included to be interpreted properly. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{outputID}(with brackets) for consistency with other definitions