Hi,

I am facing the error 422 in creating an archived item via Rest API. The 
version of DSpace that I am using is 7.6.
I am doing the following steps to create an item:

   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 the login endpoint (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=648) 

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 would appreciate any help from the community. I am stuck on this error 
for days.

Thanks,
Sara

-- 
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 Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/5301c05f-6b54-4019-9cc5-c2cd04a4a6d9n%40googlegroups.com.

Reply via email to