Hi Aroldo,
I have seen your solution. I am trying to create an item via the RestAPI and I keep getting error 422. Can you share some additional details what you did to successfully submit the an item?
I did the following to create an item. The version of DSpace that I am using is 7.6.
1. Perform an HTTP get to retrieve the xsrf-token and xsrf-cookie (server/api)
2. Grab the xsrf-token and xsrf-cookie and use them in the POST request headers to login (server/api/authn/login)
3. Grab the bearer token and updated xsrf-token from the response headers for subsequent calls. Use both tokens to verify if status for authenticate is TRUE. (server/api/authn/status). Until this point, I got the status 200 and authenticate TRUE.
4. Use the bearer token and updated xsrf-token in the POST request headers including content-type: application/json to create an item. (server/api/core/items?owningCollection=<uuid>)
I get the following error at step 4.
{"timestamp":"2023-12-18T20:49:14.673+00:00","status":422,"error":"Unprocessable Entity","message":"Unprocessable or invalid entity","path":"/server/api/core/items"}
I am stuck on this error for days and would appreciate any help.
On another note, I was able to create an item via the dspace-rest-python library. However, I want to implement a solution in Power Automate/Nintex to automate the flow via POST request.
Thanks,
Sara