Good you got it fixed Ari. Next time you can try Postman for testing your APIs. Postman can generate also the cUrl code and make tests.
Javier T. 2016-08-17 0:45 GMT-05:00 Ari <[email protected]>: > > 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-7e > 11-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/r > est/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-7e > 11-4a18-bf94-8192275e50e4/metadata" -b cookies.txt > > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "DSpace Technical Support" group. > To unsubscribe from this topic, visit https://groups.google.com/d/to > pic/dspace-tech/49KBEXeavyM/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- 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.
