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

JSON dumps no longer contain "type" entry in "files" #2504

Open
bitsgalore opened this issue Nov 8, 2023 · 0 comments
Open

JSON dumps no longer contain "type" entry in "files" #2504

bitsgalore opened this issue Nov 8, 2023 · 0 comments
Labels

Comments

@bitsgalore
Copy link

The JSON dumps generated from the REST API no longer appear to contain file type info for individual files. See as an example the following publication:

https://zenodo.org/records/3529327

An old (late 2022) JSON dump shows the following "files" entry for this record:

"files": [{"bucket": "db947caf-b9ef-4d54-a3b2-489f41b12dfa", "checksum": "md5:d8f5af9e6cfa462b23f24b4718cc3461", "key": "Jpylyzer-trailer.mp4", "links": {"self": "https://zenodo.org/api/files/db947caf-b9ef-4d54-a3b2-489f41b12dfa/Jpylyzer-trailer.mp4"}, "size": 98680838, "type": "mp4"}]

When I created a new dump today (using the same API call), the "files" entry for the same record looks like this:

"files": [{"id": "f2aa6a1b-394a-4206-ab6a-e952e53de85d", "key": "Jpylyzer-trailer.mp4", "size": 98680838, "checksum": "md5:d8f5af9e6cfa462b23f24b4718cc3461", "links": {"self": "https://zenodo.org/api/records/3529327/files/Jpylyzer-trailer.mp4/content"}}]

Note the absence of the "type" entry in the new format! I used these dumps in a script that generates automated reports of our Zenodo community, which includes file type statistics that were based on the "type" value. This is no longer possible. It's not entirely clear to me if this is a bug or an intentional change after the recent upgrade.

(BTW I'm using this script to fetch the JSON dumps, which is just a straight adaptation of the docs)

@bitsgalore bitsgalore added the Bug label Nov 8, 2023
@bitsgalore bitsgalore changed the title JSON dumps no longer contains "type" entry in "files" JSON dumps no longer contain "type" entry in "files" Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant