<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">(In the backend:)</div><div class="">EADConverter takes an EAD file (.xml) and produces a JSON file on resources: archival_objects, a parent resource record and possibly global subjects and agents. I’m not sure if there is a backend API call to do just this initial step, but you can run it from pry/irb with something like:</div><div class=""><br class=""></div><div class="">        converter = EADConverter.new( eadxml )<br class="">        converter.run<br class=""><span class="Apple-tab-span" style="white-space:pre">     </span>converter.get_output_path</div><div class=""><br class=""></div><div class="">That JSON output is what batch_import takes. </div><div class="">The JSON records temporary identifiers to link them together, and on import those links are converted to identifiers in the current repository namespace. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">So it’s typically many resource records representing one EAD file. </div><div class="">However, I think from the way it’s implemented that it would work on a collection of records no matter whether they were related. </div><div class=""><br class=""></div><div class="">— Steve. </div><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 7, 2020, at 10:44 AM, James R Griffin III <<a href="mailto:jrg5@princeton.edu" class="">jrg5@princeton.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-size: 12pt; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);" class="">I am terribly sorry, I have now found that the payload is a JSON serialization of an array of  resource objects: <a href="https://github.com/archivesspace/archivesspace/blob/master/backend/spec/controller_batch_import_spec.rb#L41" class="">https://github.com/archivesspace/archivesspace/blob/master/backend/spec/controller_batch_import_spec.rb#L41</a><br class=""><br class="">Would one then model the payload as one of these arrays of JSON objects, each with a URI internal to the EAD file?</div><div id="appendonsend" style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div><hr tabindex="-1" style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline-block; width: 899.625px;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""></span><div id="divRplyFwdMsg" dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>James R Griffin III<br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Thursday, May 7, 2020 10:30 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" class="">archivesspace_users_group@lyralists.lyrasis.org</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Question Regarding the REST API batch_imports Operation</font><div class=""> </div></div><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);" class="">Hello Everyone,<br class=""><br class="">I have recently been reviewing the documentation for the REST API, and was looking to explore the possible usage of <a href="https://archivesspace.github.io/archivesspace/api/#import-a-batch-of-records" id="LPlnk777205" class="">https://archivesspace.github.io/archivesspace/api/#import-a-batch-of-records</a><br class=""><br class="">Please forgive for my ignorance, but does the body of the POST request contain a payload of EAD XML? Would this be a string of concatenated EAD documents?<br class=""><br class="">Additionally, my understanding is that the response from this request contains an identifier for the created object. As the job for importing the records would be asynchronous, should one poll for the status of this new object by repeatedly transmitting a GET request against <a href="https://archivesspace.github.io/archivesspace/api/#find-resources-by-their-identifiers" id="LPNoLP534764" class="">https://archivesspace.github.io/archivesspace/api/#find-resources-by-their-identifiers</a> until it has been fully imported?<br class=""><br class="">Thank you for your patience and assistance.<br class=""><br class="">Sincerely,</div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);" class="">James</div><div class=""><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div id="x_Signature" class=""><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">-- </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><a href="http://my.pronoun.is/he" target="_blank" class="">my.pronoun.is/he</a></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">James R. Griffin III</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">Digital Infrastructure Developer</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><a href="https://library.princeton.edu/" class="">Princeton University Library</a></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">Princeton, NJ 08544</span></div><br class=""></div></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Archivesspace_Users_Group mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a></span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" class="">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a></span></div></blockquote></div><br class=""></body></html>