Quoth Richard Higgins on Wed, Aug 19, 2009 at 08:23:50AM -0400:
> Please can anybody provide me with a few working examples of command
> line methods of modifying and purging existing datastreams using curl.

Here’s what I use to add and delete datastreams from the command line, using
the REST API on Fedora 3.2.1:

To delete a datastream:
curl -u $FEDORA_USER:$FEDORA_PASS -X DELETE 
$FEDORA_WEBROOT/objects/$PID/datastreams/$DS

To add/update a datastream:
curl -F fi...@$filename -u $FEDORA_USER:$FEDORA_PASS 
$FEDORA_WEBROOT/objects/$PID/datastreams/$DS?controlGroup=M&checksumType=MD5&mimeType=$FILE_MIMETYPE

Fill in variables appropriate to your environment and what you want to edit,
of course. FEDORA_WEBROOT for my test installation is
http://localhost:8080/fedora .

HTH.

-- 
Ben Ranker <[email protected]>
Emory University Libraries

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to