<html><body><div style="font-family: georgia,serif; font-size: 10pt; color: #000000"><div>Hey All,</div><div><br></div><div>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:</div><div><br></div><div>Login:</div><div><br></div><div><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"> curl -F password='***' <a href="http://aspace1prod.dlt.psu.edu:9089/users/bmg17/login" data-mce-href="http://aspace1prod.dlt.psu.edu:9089/users/bmg17/login">http://aspace1prod.dlt.psu.edu:9089/users/bmg17/login</a></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">Save token:</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"> token=*****</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">Just to verify I know what I am doing, try retrieving a resource record:</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"> curl -H "X-ArchivesSpace-Session: $token" 'http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources/1352'</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">Success: <span style="font-size: 10pt;" data-mce-style="font-size: 10pt;">{"lock_version":0,"title":"Frederick R. Matson papers","publish":true,<strong> etc. etc. etc.</strong></span></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-size: 10pt;" data-mce-style="font-size: 10pt;"><strong><br></strong>I'm not going to do a mass publish yet, but went ahead and retrieved all the ids anyway:</span></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-size: 10pt;" data-mce-style="font-size: 10pt;"><br></span></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"> curl -H "X-ArchivesSpace-Session: $token" 'http://aspace1prod.dlt.psu.edu:9089/repositories/3/resources?all_ids=true'</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">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:</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"> 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"</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">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?</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">Thanks, in advance, for any help.</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">-Ben</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-size: 10pt;" data-mce-style="font-size: 10pt;"><br></span></p></div><div><br></div><div><span name="x"></span><span data-mce-style="color: #000000; font-size: small;" style="color: #000000; font-size: small;" size="2"><span style="font-family: georgia,serif; font-weight: bold;">Ben Goldman</span><br style="font-family: georgia,serif;"><span style="font-family: georgia,serif;">Digital Records Archivist</span><br style="font-family: georgia,serif;"><span style="font-family: georgia,serif;">Penn State University Libraries</span><br style="font-family: georgia,serif;"><span style="font-family: georgia,serif;">University Park, PA</span><br style="font-family: georgia,serif;"><span style="font-family: georgia,serif;">814-863-8333<br><a href="http://www.libraries.psu.edu/psul/speccolls.html">http://www.libraries.psu.edu/psul/speccolls.html</a><br></span></span><span name="x"></span><br></div></div></body></html>