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

First STAC document for results not easy to retrieve #397

Closed
m-mohr opened this issue May 27, 2021 · 3 comments · Fixed by #400
Closed

First STAC document for results not easy to retrieve #397

m-mohr opened this issue May 27, 2021 · 3 comments · Fixed by #400
Labels
minor requires a minor-version (x.1.0 for example)
Milestone

Comments

@m-mohr
Copy link
Member

m-mohr commented May 27, 2021

In the Map Viewer proposal we identified that it's not easy to share results as the "initial" STAC document returned by GET /jobs/:id/results is only returned for authenticated users. This way it's not easy to share that file although all children and data are already signed URLs anyway.

We should also expose the response of GET /jobs/:id/results as a signed URL. The idea is to simply add a Link header, which points to the file itself as a signed URL.

For example the response for GET /jobs/:id/results could look like:

Content-Type: application/json
Link: <https://example.openeo.org/api/jobs/2584892312376463251497856398476123746/collection.json>; rel="canonical"

{
  "$comment": "Spit out the content of the link above as a response",
  "stac_version": "1.0.0",
  "assets": {...}
}

Rel types for consideration: alternate, duplicate, collection/item, canonical

@m-mohr m-mohr added this to the 1.2.0 milestone May 27, 2021
@m-mohr
Copy link
Member Author

m-mohr commented Jun 4, 2021

Alternatively, the "self" link (or "canonical") in the document could point to a signed URL. That's better integrated with STAC compared to the Link in the header.

Example:

{
  "stac_version": "1.0.0",
  "assets": {...},
  "links": [
    {
      "href": "https://example.openeo.org/api/jobs/2584892312376463251497856398476123746/collection.json",
      "rel": "canonical"
    }
  ]
}

Anyway, it would be good if the results could be retrieved purely via a signed URL. I doubt that this will be hard to implement as the signed URL code is available for the other files anyway.

m-mohr added a commit that referenced this issue Jun 4, 2021
…ion type `canonical` which points to a signed URL with the same content as the response. #397
@m-mohr
Copy link
Member Author

m-mohr commented Jun 4, 2021

Added PR #400 with a proposal.

@m-mohr m-mohr added the minor requires a minor-version (x.1.0 for example) label Jun 4, 2021
m-mohr added a commit that referenced this issue Jun 29, 2021
Provide link with rel type canonical for batch job results #397
@m-mohr
Copy link
Member Author

m-mohr commented Jun 29, 2021

Merged, will be part of openEO API v1.2.0 (or v2.0.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor requires a minor-version (x.1.0 for example)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant