<div dir="ltr"><div><div><div><div><div><div><div>If you have NodeJS installed and want to try a *very* experimental tool, you could try this too:<br><br></div>$ npm install as-cli -g<br></div>$ as-cli setup <br>> {ENTER YOUR BACKEND URL, USER, PASSWORD}<br></div>$ as-cli repositories <br></div>> {SELECT YOUR REPOSITORY}<br></div>$ as-cli batch-export --dir {A DIRECTORY}<br><br></div>But I stress that this really an unsupported prototype.<br><br></div>Brian<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 1:04 PM, Steven Majewski <span dir="ltr"><<a href="mailto:sdm7g@virginia.edu" target="_blank">sdm7g@virginia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><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" target="_blank">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)">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" target="_blank">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" target="_blank">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" target="_blank">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/" target="_blank">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" target="_blank">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 style="white-space:pre-wrap"> </span> <a href="https://gist.github.com/cfitz/9eb97ad3f6dd772f875f" target="_blank">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><div class="h5"><div><br></div><div><br></div><div><div>On Jan 21, 2015, at 8:57 AM, Ben Goldman <<a href="mailto:bmg17@psu.edu" target="_blank">bmg17@psu.edu</a>> wrote:</div><br><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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing: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><div style="font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From:<span> </span></b>"Noah Huffman" <<a href="mailto:noah.huffman@duke.edu" target="_blank">noah.huffman@duke.edu</a>><br><b>To:<span> </span></b>"Archivesspace Users Group" <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a>><br><b>Sent:<span> </span></b>Tuesday, January 20, 2015 9:32:56 AM<br><b>Subject:<span> </span></b>Re: [Archivesspace_Users_Group] curl help<br><div><br></div><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(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’" target="_blank">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" style="color:purple;text-decoration:underline" target="_blank">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> </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" style="color:purple;text-decoration:underline" target="_blank">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" style="color:purple;text-decoration:underline" target="_blank"><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)"><a href="tel:919-660-5982" value="+19196605982" target="_blank">919-660-5982</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)"><a href="http://library.duke.edu/rubenstein/" style="color:purple;text-decoration:underline" target="_blank"><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> </span><a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a> [<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org</a>]<span> </span><b>On Behalf Of<span> </span></b>Ben Goldman<br><b>Sent:</b><span> </span>Monday, January 19, 2015 3:56 PM<br><b>To:</b><span> </span>Archivesspace Users Group<br><b>Subject:</b><span> </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> </span><a href="http://aspace1prod.dlt.psu.edu:9089/users/bmg17/login" style="color:purple;text-decoration:underline" target="_blank">http://aspace1prod.dlt.psu.edu:9089/users/bmg17/login</a></span></div><p 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 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 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 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'" target="_blank">http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources/1352'</a></span></div><p 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> </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'" target="_blank">http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources?all_ids=true'</a></span></div><p 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 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" target="_blank">http://aspace1prod.dlt.psu.edu:9089/repositories/3/resource_descriptions/$ids.xml?numbered_cs=true</a>"</span></div><p 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 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 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><a href="tel:814-863-8333" value="+18148638333" target="_blank">814-863-8333</a><br><a href="http://www.libraries.psu.edu/psul/speccolls.html" style="color:purple;text-decoration:underline" target="_blank">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" target="_blank">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><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" target="_blank">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" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a></div></blockquote></div><br></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>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Brian Hoffman<br><a href="mailto:brianjhoffman@gmail.com">brianjhoffman@gmail.com</a></div>
</div>