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

Add optional "method", "headers", and "body" fields to Item AssetObject #1327

Open
indiejames opened this issue Oct 16, 2024 · 4 comments
Open
Milestone

Comments

@indiejames
Copy link

Currently Assets only support an "href" field that can be used to retrieve data. At times a download may require an HTTP method other than GET, e.g., POST, especially if there are parameters involved that cannot fit into a URL, in which case a body is needed. Similarly, a download may require specific headers to be set.

Link Objects support all of these via the "method", "headers", and "body" optional fields. It makes sense to add these as optional fields to Asset Objects as well.

This could potentially be done as an extension, but that is less likely to be supported by libraries, so it would probably be better if this were part of the core spec.

@m-mohr m-mohr added this to the 1.2 milestone Oct 21, 2024
@m-mohr
Copy link
Collaborator

m-mohr commented Nov 12, 2024

This would make normal downloads in browsers difficult to impossible.

@emmanuelmathot
Copy link
Collaborator

In my opinion, those fields should likely be placed in the free storage fields. If a header needs to be set, it is probably related to a function (e.g., authentication) that has its own extension.

@m-mohr
Copy link
Collaborator

m-mohr commented Nov 12, 2024

What are the use cases? Could people collect and describe those here?

@indiejames
Copy link
Author

@m-mohr the use case we have is that some of the data we generate STAC items for require many parameters for the download, so can only be reached via a POST (the URL with query parameters would be too long). Specifically, some Open DAP links.

@emmanuelmathot if I am remembering correctly what you mean by "free storage fields", those could be used internally, but would not be supported by libraries like pystac.

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

No branches or pull requests

3 participants