[Archivesspace_Users_Group] curl help
Ben Goldman
bmg17 at psu.edu
Mon Jan 19 15:55:56 EST 2015
Hey All,
Wondering if anyone can help a cURL novice work through the process of exporting a finding aid from the API. I've reviewed some of the past emails on this subject from Noah and Kevin but I am still hung up somewhere. A quick recap:
Login:
curl -F password='***' http://aspace1prod.dlt.psu.edu:9089/users/bmg17/login
Save token:
token=*****
Just to verify I know what I am doing, try retrieving a resource record:
curl -H "X-ArchivesSpace-Session: $token" 'http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources/1352'
Success: {"lock_version":0,"title":"Frederick R. Matson papers","publish":true, etc. etc. etc.
I'm not going to do a mass publish yet, but went ahead and retrieved all the ids anyway:
curl -H "X-ArchivesSpace-Session: $token" 'http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources?all_ids=true'
A long list. Including a very short resource record with the id of 9235. Now I am wondering exactly how I put this together to export just this one. This is the command mentioned in previous messages:
curl --output “resource_#1.xml” -H "X-ArchivesSpace-Session: $TOKEN" 'http://aspace1prod.dlt.psu.edu:9089/repositories/3/resource_descriptions/$ids.xml?numbered_cs=true"
I assume if I'm just exporting one, I can replace '$ids" with the actual number (9235), and that the value following --output can be whatever I want the finding aid file name to be. Is all this correct? And where would this actually output the file to?
Thanks, in advance, for any help.
-Ben
Ben Goldman
Digital Records Archivist
Penn State University Libraries
University Park, PA
814-863-8333
http://www.libraries.psu.edu/psul/speccolls.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20150119/6bbc7d7b/attachment.html>
More information about the Archivesspace_Users_Group
mailing list