weaver icon indicating copy to clipboard operation
weaver copied to clipboard

Support various return preference header

Open fmigneault opened this issue 3 years ago • 3 comments

Description

  • Allow specification of return=minimal|representation in Prefer header to control how to return results. (equivalent of current response parameter in request body, see #376)
  • Provide the Preference-Applied header in response with return if honoured.

Conformance items

  • [ ] https://github.com/opengeospatial/ogcapi-processes/blob/master/core/recommendations/core/REC_job-results-success-async-many-json-prefer-none.adoc
  • [ ] https://github.com/opengeospatial/ogcapi-processes/blob/master/core/recommendations/core/REC_job-results-success-async-many-json-prefer-minimal.adoc
  • [ ] https://github.com/opengeospatial/ogcapi-processes/blob/master/core/recommendations/core/REC_job-results-success-async-many-json-prefer-representation.adoc
  • [ ] https://github.com/opengeospatial/ogcapi-processes/blob/master/core/recommendations/core/REC_process-execute-success-sync-many-json-prefer-minimal.adoc
  • [ ] https://github.com/opengeospatial/ogcapi-processes/blob/master/core/recommendations/core/REC_process-execute-success-sync-many-json-prefer-representation.adoc
  • [ ] https://github.com/opengeospatial/ogcapi-processes/blob/master/core/recommendations/core/REC_process-execute-success-sync-many-json-prefer-none.adoc

References

  • return preference: https://datatracker.ietf.org/doc/html/rfc7240#section-4.2
  • https://github.com/opengeospatial/ogcapi-processes/issues/215
  • relates to #247
  • relates to #376
  • relates to GD-535
  • relates to DAC-531

fmigneault avatar Mar 15 '22 19:03 fmigneault

I like this proposal ! 👍 (even if I'd prefer to see the output resources links available in the job resource aka 'status' 😆 )

christophenoel avatar Jul 05 '22 07:07 christophenoel

@christophenoel One approach could be to have similar Prefer: return=minimal|representation header for the /jobs/{jobID} status request itself (instead of the execution request). By default, minimal job status would indicate to omit results inline (as currently defined by the spec), while representation would merge them all together in the status response to avoid the second request to /jobs/{jobID}/results to obtain them.

fmigneault avatar Jul 05 '22 16:07 fmigneault

That's a very creative solution that I fully support ! 👍

christophenoel avatar Jul 06 '22 07:07 christophenoel