Delete API REST Dspace 5.x

22 Views Asked by At

I am trying to delete an element of the Dspace 5.X software that makes use of its REST API.

To do this, I authenticate first:

curl -H "Content type: application/json" --data '{"email":"user", "password":"password"}' https://URL/rest/login

I receive a token, which I will use later

I check the status to verify that the token works

curl -X GET -H "Content type: app/json" -H "Accept: app/json" -H "rest-dspace-token: token" https://URL/rest/status

All good, but when trying to delete the item, I'm not sure if the curl command is correct:

curl -X DELETE -H "Content type: app/json" -H "Accept: app/json" -H "rest-dspace-token: token" https://URL/rest/items/item_id

It gives me an error 500

Any suggestions?

0

There are 0 best solutions below