Thanks for suggestion, Javier.
However, I managed to find the problem. I had to add square brackets around
JSON object:
curl -X PUT -H "Content-Type: application/json" -d
'[{"key":"dc.description.abstract",
"value":"hello", "language":"no"}]'
"http://dummy_dspace_address.com:8080/rest/items/0000c4c0-7e11-4a18-bf94-8192275e50e4/metadata"
-b cookies.txt
Here is a full procedure using CURL, if someone is interested (current
documentation is misleading)
1. First, authenticate your self:
curl --data "email=your.email&password=your_pass"
http://your_dspace.com:8080/rest/login
-c cookies.txt
2. Test that authentication was successful:
curl -H "Accept: application/json" http://your_dspace.com:8080/rest/status
-b cookies.txt
- this should return something like this:
{"okay":true,"authenticated":true,"email":"your.email","fullname":"ari ",
"sourceVersion":null,"apiVersion":null}
3. And finally, make an edit:
curl -X PUT -H "Content-Type: application/json" -d
'[{"key":"dc.description.abstract",
"value":"hello", "language":"no"}]'
"http://dummy_dspace_address.com:8080/rest/items/0000c4c0-7e11-4a18-bf94-8192275e50e4/metadata"
-b cookies.txt
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.