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 method to access hatrac metadata #30

Open
carlkesselman opened this issue May 21, 2018 · 3 comments
Open

Add method to access hatrac metadata #30

carlkesselman opened this issue May 21, 2018 · 3 comments

Comments

@carlkesselman
Copy link
Contributor

There is currently no way within the library to access the metadata associated with a hatrac URL. It would be good to provide this functionality. In addition, get/put methods should resturn metadata as well.

@karlcz
Copy link
Contributor

karlcz commented Jul 6, 2018

We need to think about what we want here. The metadata available to regular clients is just what you can get from a HEAD request on the object path, inspecting the response.headers dictionary.

An owner of the object can also manipulate the path;metadata and path;metadata/key sub-resources which allow some management of this state. However, these will often respond with Forbidden errors for less privileged clients.

@karlcz
Copy link
Contributor

karlcz commented Jul 6, 2018

Also, I'm not sure what you mean by getting metadata from a PUT request. The only new information produced by PUT should be the versioned path, which is already returned. Shouldn't everything else be known by the client already? E.g. file size and hash?

@carlkesselman
Copy link
Contributor Author

Not sure. Perhaps issue is just documentation. Was not apparent at first blush that while using deriva-py I would use the head request to get the metadata like MD5 code and length as returned by server. I was thinking that as an alternative that information would be returned by default along with the path.

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

No branches or pull requests

2 participants