Closed johnbradley closed 1 year ago
The MorphoSource API has a /api/download/{media-id} endpoint that requires quite a few parameters: use statement, use category, and agreements accepted flag. This endpoint also requires a user to pass a MorphoSource API key via the request header. The endpoint returns JSON with a download_url
that also requires the MorphoSource API key in the header.
The download_url
returns a zip file with multiple files instead of just the media file.
For example downloading media id 000010112
returns a zip file with the following layout:
Some media a restricted and if approval hasn't been given the download_url will return a 404. In the JSON payload for these restricted media there is the following propery 'visibility': ['restricted_download']
. I don't think there is a way to request access via the API. I think the only option is to request access via the MorphoSource website, wait for permissions (if given) and then you can download. For items that don't require asking for permission the visibility seems to be ['open']
.
I don't think there is a way to request access via the API. I think the only option is to request access via the MorphoSource website,
Yes, this package/tool will be strictly for open-access datasets. Under their search, I believe this is indicated by the field "Publication Status" (see the screen capture).
Implemented by #5
Allow users to download files from morphosource.