Submitting items using dspace 7 REST APTI

252 views
Skip to first unread message

Aroldo Rique Júnior

unread,
Jan 13, 2024, 7:00:54 AM1/13/24
to DSpace Community
Guys, is anyone using the Dspace 7.x REST API to submit items?

I can log in and check the status normally. I've already learned the /server/api/authn/login and /server/api/authn/status calls.

I haven't been able to submit an item yet. From what I understand, first I authenticate and then I look for an id passing the uuid of the collection as a parameter, through the REST call /server/api/submission/workspaceitems?owningCollection=c57788fc-ad35-4e86-9b3c-764bad9d8bca

And then, how do I submit my form fields? With which REST call? I created a test form with just one metadata: dc.title.

Checking how the submission process occurs in the Chrome inspector, I saw that the REST call /server/api/submission/workspaceitems/155687 is executed with PATCH. Wouldn't it be POST?

image.png

Does anyone have a complete example of item submission using the REST API?

Att,

Aroldo Rique Júnior

unread,
Jan 13, 2024, 11:41:48 PM1/13/24
to DSpace Community

gessyc...@gmail.com

unread,
Sep 17, 2024, 12:49:44 PM9/17/24
to DSpace Community
Hi Aroldo,

I'm trying to do the same thing as you. I need to do a /server/api/workflow/workflowitems to add items but I couldn't. Could you please detail the steps you followed?

Thank you very much
Gessy

Kim Shepherd

unread,
Sep 20, 2024, 7:39:50 AM9/20/24
to gessyc...@gmail.com, DSpace Community
Hi all, a good place to start is https://github.com/dspace/restcontract which describes the endpoints and the kind of request and response data involved. There are often examples given as curl commands.

If looking at example code is preferred, you can also see some examples of simple API usage here in this basic Python REST library: https://github.com/the-library-code/dspace-rest-python - creating, updating, deleting basic objects like items, bitstreams, collections and communities is covered and it is slowly getting updated to fulfill more functionality.

-k

0CCB D957 0C35 F5C1 497E CDCF FC4B ABA3 2A1A FAEC


--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/583b6dc2-5468-4942-a901-fdafa28a8a26n%40googlegroups.com.

DSpace Community

unread,
Oct 3, 2024, 12:47:05 PM10/3/24
to DSpace Community
Hi all,

I also wanted to note that we have a guide for submission via the REST API in the contract here: https://github.com/DSpace/RestContract/blob/main/submission.md

If anyone finds ways to enhance that guide, I'd also welcome improvements!

Tim

Reply all
Reply to author
Forward
0 new messages