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

Consider using the new InvenioRDM API for depositing #300

Open
schlauch opened this issue Dec 17, 2024 · 7 comments
Open

Consider using the new InvenioRDM API for depositing #300

schlauch opened this issue Dec 17, 2024 · 7 comments

Comments

@schlauch
Copy link

schlauch commented Dec 17, 2024

  • I tried to deposit something using hermes and a fresh InvenioRDM v12.0 instance.
  • It seems that there is no longer support for the /api/deposit/depositions endpoint in InvenioRDM v12.0.
  • Instead it seems that you have to use the following API: https://inveniordm.docs.cern.ch/reference/rest_api_drafts_records/ But this would require quite some rework in deposit/invenio.py. However, it could be worth as Zenodo might switch completely to the new API at some point and hermes would be ready for (new) self-hosted InvenioRDM instances.

At least, it seems in my first tests that zenodo already supports the new API:

curl -X POST https://zenodo.org/api/records -d "{}" -H "Content-Type: application/json" -H "Authorization: Bearer {token}"

{"created": "2024-12-17T18:52:25.501056+00:00", "modified": "2024-12-17T18:52:25.545082+00:00", "id": 14510420, "conceptrecid": "14510419", "metadata": {"access_right": "open", "relations": {"version": [{"index": 0, "is_last": false, "parent": {"pid_type": "recid", "pid_value": "14510419"}}]}}, "title": "", "links": {"self": "https://zenodo.org/api/records/14510420/draft", "self_html": "https://zenodo.org/uploads/14510420", "self_iiif_manifest": "https://zenodo.org/api/iiif/draft:14510420/manifest", "self_iiif_sequence": "https://zenodo.org/api/iiif/draft:14510420/sequence/default", "files": "https://zenodo.org/api/records/14510420/draft/files", "media_files": "https://zenodo.org/api/records/14510420/draft/media-files", "archive": "https://zenodo.org/api/records/14510420/draft/files-archive", "archive_media": "https://zenodo.org/api/records/14510420/draft/media-files-archive", "versions": "https://zenodo.org/api/records/14510420/versions", "record": "https://zenodo.org/api/records/14510420", "record_html": "https://zenodo.org/records/14510420", "publish": "https://zenodo.org/api/records/14510420/draft/actions/publish", "review": "https://zenodo.org/api/records/14510420/draft/review", "reserve_doi": "https://zenodo.org/api/records/14510420/draft/pids/doi", "access_links": "https://zenodo.org/api/records/14510420/access/links", "access_grants": "https://zenodo.org/api/records/14510420/access/grants", "access_users": "https://zenodo.org/api/records/14510420/access/users", "access_request": "https://zenodo.org/api/records/14510420/access/request", "access": "https://zenodo.org/api/records/14510420/access", "communities": "https://zenodo.org/api/records/14510420/communities", "communities-suggestions": "https://zenodo.org/api/records/14510420/communities-suggestions", "requests": "https://zenodo.org/api/records/14510420/requests"}, "updated": "2024-12-17T18:52:25.545082+00:00", "recid": "14510420", "revision": 4, "files": [], "owners": [{"id": "47466"}], "status": "draft", "state": "unsubmitted", "submitted": false}
@zyzzyxdonta
Copy link
Contributor

That's interesting. I can't find any reference to the old API being removed in any of the changelogs. Did you find out anything about this? If not, maybe you're just missing an old package or parameter in you installation 🤔

@schlauch
Copy link
Author

schlauch commented Dec 18, 2024

The main question is whether InvenioRDM has any plans to add the "/deposit" endpoint. Right now you cannot use hermes with a recent InvenioRDM installation.

And - as a newbie - it seems that you can do all the depositing with the "/records" endpoint. Thus, my guess is:

  • Zenodo will as long as possible support both.
  • InvenioRDM will not introduce a legacy API endpoint.

@schlauch
Copy link
Author

And to answer your question more concretely:

@zyzzyxdonta
Copy link
Contributor

It is still documented here: https://developers.zenodo.org/#depositions

@schlauch
Copy link
Author

Yes, for Zenodo but my problem is with InvenioRDM.

@zyzzyxdonta
Copy link
Contributor

I know 😁

@schlauch
Copy link
Author

schlauch commented Dec 18, 2024

But in the end, you could have both support for Zenodo and InvenioRDM on the basis of the records API. Right or am I wrong here?

And yes I know that this means some substantial rework effort. But first I want to figure out whether my assumption is correct.

I might be also willing to help with the implementation. However, let us talk about this end of January...

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