<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>Chris Fitzpatrick has a bunch of examples of Ruby code using RestClient and the AS backend API </div><div>at: <a href="https://gist.github.com/cfitz">https://gist.github.com/cfitz</a></div><div><br></div><div>but if you want to do a bulk export of a repo, there is a script in the current release: archivesspace/scripts/ead_export.sh </div><div><br></div><div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219); position: static; z-index: auto;">Usage: export.rb <username> <password> <repository_id></div></div><div><br></div><div>which will make a zip file of all of the resources exported from a repository. </div><div><br></div><div>The ruby code is here ( as another example of using the API ): </div><div><br></div><div><a href="https://github.com/archivesspace/archivesspace/blob/master/launcher/ead_export/lib/ead_export.rb">https://github.com/archivesspace/archivesspace/blob/master/launcher/ead_export/lib/ead_export.rb</a></div><div><br></div><div>Before finding cfitz more thorough delete_repo <a href="https://gist.github.com/cfitz/4fefcfa659ef18bfbe6c">https://gist.github.com/cfitz/4fefcfa659ef18bfbe6c</a></div><div>I was using this shell script to delete all resources from a repository ( so we could retest imports </div><div>after code patches ). I’m including it here as another example of scripting the API with curl from </div><div>the shell. </div><div><br></div><div><br></div><div><br></div><div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">REPO=<a href="http://localhost:8089">http://localhost:8089</a></div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">#</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">REPO_ID=$1</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">#</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">user=admin</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">pass=admin</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219); min-height: 18px;"><br></div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">session=$(curl -s -F password="$pass" "$REPO/users/$user/login" |</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);"> sed 's|.*"session":"\([a-z0-9]*\)".*|\1|g')</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219); min-height: 18px;"><br></div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">echo "Repo: $REPO" </div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">echo "Session $session" 1>&2</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219); min-height: 18px;"><br></div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">curl -H "X-ArchivesSpace-Session: $session" "$REPO/repositories/$REPO_ID" | jq . </div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219); min-height: 18px;"><br></div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">DELETE='-X DELETE'</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">for ID in $( curl -H "X-ArchivesSpace-Session: $session" "$REPO/repositories/$REPO_ID/resources?all_ids=true" | tail -1 | tr '[],' ' ' )</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">do</div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">curl -H "X-ArchivesSpace-Session: $session" $DELETE $REPO/repositories/$REPO_ID/resources/$ID | jq . </div><div style="margin: 0px; font-family: Menlo; background-color: rgb(255, 238, 219);">done</div></div><div><br></div><div><br></div><div><br></div><div><div>I highly recommend jq <a href="http://stedolan.github.io/jq/">http://stedolan.github.io/jq/</a> for pretty printing and exploring json output from</div><div>the API. ‘jq . ‘ (in the example above just does a json pretty print, but you can also select particular fields: </div></div><div><br></div><div><div>R=<a href="http://localhost:8089/repositories">http://localhost:8089/repositories</a></div>
<div><br></div>
<div><font face="Andale Mono"><span style="font-size: 14px;">./curl_as_osx admin admin $R | jq '.[].repo_code</span><span style="font-size: 14px;">’ # list repository codes</span></font></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"uva-sc"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"RG_3"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"Legacy"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"lsc-test"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"sdm7g-test"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"uva-hsl"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"tsd-test"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"mhm8m-test"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"uvalaw-test"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"img7u-test"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"elg3e-test"</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';"><br></span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';"># get repo-id # from repo-code</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">./curl_as_osx admin admin $R | jq '.[0:-1]| map(select( .repo_code == "img7u-test" ))|.[0].uri'</span></span></div>
<div><span style="font-size: 14px;"><span style="font-family: 'Andale Mono';">"/repositories/12"</span></span></div>
<div></div></div><div><br></div><div><br></div><div>And, although I haven’t tried it, you could pull json from AS with a GET, edit a field on the fly with jq, and post the modified</div><div>json back to ArchivesSpace. However, the jq syntax can be difficult. Chris’s bulk_update </div><div><span class="Apple-tab-span" style="white-space:pre"> </span> <a href="https://gist.github.com/cfitz/9eb97ad3f6dd772f875f">https://gist.github.com/cfitz/9eb97ad3f6dd772f875f</a></div><div>may be a better way. It does a merge on the ruby hash of the parsed JSON, which may be a bit easier to follow than jq syntax. </div><div><br></div><div><br></div><div>— Steve Majewski </div><div><br></div><div><br></div><div><div>On Jan 21, 2015, at 8:57 AM, Ben Goldman <<a href="mailto:bmg17@psu.edu">bmg17@psu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="font-family: georgia, serif; font-size: 10pt;"><div>Noah, thanks for the feedback. It's good to know I am on the right track. I was able to get that to work. And in fact, we were able to build on that and perform a mass export of the finding aids, though for some reason only 1914 of 1940 resources were exported. <br></div><div><br></div><div>Now I am wondering how I might adjust the script to export the XML file with a file name that uses the value of the resource's identifier field rather than the ASpace system identifier for the record. </div><div><br></div><div>I agree that it would be great to see the documentation on the API/cURL expand in the way you outline. I feel there is so much more I could do with the API, that I do not fully understand the capabilities here. I just know being able to mass export finding aids with one script is pretty damn cool.</div><div><br></div><div>Thanks,</div><div>Ben</div><div><br></div><div><br></div><hr id="zwchr"><div style="font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;"><b>From:<span class="Apple-converted-space"> </span></b>"Noah Huffman" <<a href="mailto:noah.huffman@duke.edu">noah.huffman@duke.edu</a>><br><b>To:<span class="Apple-converted-space"> </span></b>"Archivesspace Users Group" <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org">archivesspace_users_group@lyralists.lyrasis.org</a>><br><b>Sent:<span class="Apple-converted-space"> </span></b>Tuesday, January 20, 2015 9:32:56 AM<br><b>Subject:<span class="Apple-converted-space"> </span></b>Re: [Archivesspace_Users_Group] curl help<br><div><br></div><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Hi Ben,</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">I’m a curl novice too, but your last example should work to output a single EAD file to the current directory. The only thing I see is that in your example you have a single quote to begin the URL and a double quote to end it. Maybe change the double quote at the very end to a single quote, or make both double quotes?</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Something like:</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">curl --output “EADfilename.xml” -H "X-ArchivesSpace-Session: $TOKEN" ‘<a href="http://aspace1prod.dlt.psu.edu:9089/repositories/3/resource_descriptions/9235.xml?numbered_cs=true’">http://aspace1prod.dlt.psu.edu:9089/repositories/3/resource_descriptions/9235.xml?numbered_cs=true’</a></span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">This works for me in Windows Powershell.</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">More generally, I think it would be helpful for noobs like us if the ASpace documentation included a short primer (with examples) on how to use curl to interact with the API. This could supplement the existing API documentation at:<a href="http://archivesspace.github.io/archivesspace/doc/file.API.html" target="_blank" style="color: purple; text-decoration: underline;">http://archivesspace.github.io/archivesspace/doc/file.API.html</a></span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">The ASpace developer screencasts are a good reference if you haven’t seen them, particularly this one</span><span class="Apple-converted-space"> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"><a href="http://youtu.be/iKd4ZME1uIE?list=PLJFitFaE9AY_DDlhl3Kq_vFeX27F1yt6I" target="_blank" style="color: purple; text-decoration: underline;">http://youtu.be/iKd4ZME1uIE?list=PLJFitFaE9AY_DDlhl3Kq_vFeX27F1yt6I</a></span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">-Noah</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(64, 64, 64);">================</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(64, 64, 64);">Noah Huffman</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(64, 64, 64);">Archivist for Metadata and Encoding</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(64, 64, 64);">David M. Rubenstein Rare Book & Manuscript Library</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(64, 64, 64);">Duke University</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(64, 64, 64);"><a href="mailto:noah.huffman@duke.edu" target="_blank" style="color: purple; text-decoration: underline;"><span style="color: rgb(64, 64, 64);">noah.huffman@duke.edu</span></a></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(64, 64, 64);">919-660-5982</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(64, 64, 64);"><a href="http://library.duke.edu/rubenstein/" target="_blank" style="color: purple; text-decoration: underline;"><span style="color: rgb(64, 64, 64);">http://library.duke.edu/rubenstein/</span></a></span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div><div style="border-style: solid none none; border-top-color: rgb(225, 225, 225); border-top-width: 1pt; padding: 3pt 0in 0in;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><b><span style="font-size: 11pt; font-family: Calibri, sans-serif;">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><span class="Apple-converted-space"> </span><a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">archivesspace_users_group-bounces@lyralists.lyrasis.org</a> [<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org</a>]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>Ben Goldman<br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, January 19, 2015 3:56 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Archivesspace Users Group<br><b>Subject:</b><span class="Apple-converted-space"> </span>[Archivesspace_Users_Group] curl help</span></div></div></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"> </p><div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">Hey All,</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">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:</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">Login:</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> curl -F password='***'<span class="Apple-converted-space"> </span><a href="http://aspace1prod.dlt.psu.edu:9089/users/bmg17/login" target="_blank" style="color: purple; text-decoration: underline;">http://aspace1prod.dlt.psu.edu:9089/users/bmg17/login</a></span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">Save token:</span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> token=*****</span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">Just to verify I know what I am doing, try retrieving a resource record:</span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> curl -H "X-ArchivesSpace-Session: $token" '<a href="http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources/1352'">http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources/1352'</a></span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">Success: {"lock_version":0,"title":"Frederick R. Matson papers","publish":true,<strong><span style="font-family: Georgia, serif;"><span class="Apple-converted-space"> </span>etc. etc. etc.</span></strong></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><b><span style="font-size: 10pt; font-family: Georgia, serif;"><br></span></b><span style="font-size: 10pt; font-family: Georgia, serif;">I'm not going to do a mass publish yet, but went ahead and retrieved all the ids anyway:</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"><br><br></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> curl -H "X-ArchivesSpace-Session: $token" '<a href="http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources?all_ids=true'">http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources?all_ids=true'</a></span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">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:</span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> curl --output “resource_#1.xml” -H "X-ArchivesSpace-Session: $TOKEN" '<a href="http://aspace1prod.dlt.psu.edu:9089/repositories/3/resource_descriptions/$ids.xml?numbered_cs=true">http://aspace1prod.dlt.psu.edu:9089/repositories/3/resource_descriptions/$ids.xml?numbered_cs=true</a>"</span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">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?</span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">Thanks, in advance, for any help.</span></div><p class="p1" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;">-Ben</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"><br><br></span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10pt; font-family: Georgia, serif;"> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><b><span style="font-family: Georgia, serif;">Ben Goldman</span></b><span style="font-family: Georgia, serif;"><br>Digital Records Archivist<br>Penn State University Libraries<br>University Park, PA<br>814-863-8333<br><a href="http://www.libraries.psu.edu/psul/speccolls.html" target="_blank" style="color: purple; text-decoration: underline;">http://www.libraries.psu.edu/psul/speccolls.html</a><br><br></span><span style="font-size: 10pt; font-family: Georgia, serif;"></span></div></div></div></div><br>_______________________________________________<br>Archivesspace_Users_Group mailing list<br><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br>http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<br></div><div><br></div></div>_______________________________________________<br>Archivesspace_Users_Group mailing list<br><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" style="color: purple; text-decoration: underline;">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" style="color: purple; text-decoration: underline;">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a></div></blockquote></div><br></body></html>