<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi John,<div><br></div><div>I am not sure if there is a way to do this directly through the API, but my team has come up with a way to do this through a Python script. We actually modified a script written by Duke (thank you Noah Huffman if you are out there!) to update major record types in ASpace. I use OpenRefine to structure the data/JSON then export via its Custom Tabular Export feature. </div><div><br></div><div>I've tried to document my process in these two docs:</div><div>Using the scripts: <a href="https://docs.google.com/document/d/12b9YN-_XFaFyEQivMm3g_9gMJ5tkm3JJMSg1fyLYUgA/edit?usp=sharing">https://docs.google.com/document/d/12b9YN-_XFaFyEQivMm3g_9gMJ5tkm3JJMSg1fyLYUgA/edit?usp=sharing</a><br></div><div>Using the templates: <a href="https://docs.google.com/document/d/1ulryK7V-_j-jQhIE_Dg3KqfCNexuUu8KHENLLz6njjs/edit?usp=sharing">https://docs.google.com/document/d/1ulryK7V-_j-jQhIE_Dg3KqfCNexuUu8KHENLLz6njjs/edit?usp=sharing</a></div><div><br></div><div>The "update" scripts/templates post a completely new array/set of, in your case e.g., linked subjects. The "append" ones tack on a subject to an existing array of subjects.</div><div><br></div><div>I have actually only posted the update subject links (not append), and only to resource records, but it should work if you change the resource endpoint to a digital object endpoint (I would think... we don't use ASpace for digital objects). But there is no reason why adapted an append subject script wouldn't work. You will just need to know the digital object ASpace IDs and the subject IDs you want to use.</div><div><br></div><div>Hopefully, my documentation is clearish, but it is drafty and not quite ready for prime time! I think it can be adapted for different uses.</div><div><br></div><div>Thanks,</div><div>Olivia</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 18, 2019 at 11:20 AM Rees, John (NIH/NLM) [E] <<a href="mailto:reesj@mail.nlm.nih.gov">reesj@mail.nlm.nih.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_1360384835262586336WordSection1">
<p class="MsoNormal">We’re trying to post-process digital objects and link existing subjects to them via the API, however there doesn’t seem to be a call to do this.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Are we missing something? It seems doable for linked_agents and linked_events.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Or is the preferred approach to insert subjects?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><a href="https://archivesspace.github.io/archivesspace/api/#update-a-digital-object" target="_blank">https://archivesspace.github.io/archivesspace/api/#update-a-digital-object</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">John<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">John P. Rees<u></u><u></u></p>
<p class="MsoNormal">Archivist and Digital Resources Manager<u></u><u></u></p>
<p class="MsoNormal">History of Medicine Division<u></u><u></u></p>
<p class="MsoNormal">National Library of Medicine<u></u><u></u></p>
<p class="MsoNormal">301-827-4510<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><font color="#000000">Olivia Solis, MSIS</font></div><div style="font-size:12.8px"><font color="#000000">Metadata Coordinator</font></div><div style="font-size:12.8px"><font color="#000000">Dolph Briscoe Center for American History</font></div><div style="font-size:12.8px"><font color="#000000">The University of Texas at Austin</font></div><div style="font-size:12.8px"><font color="#000000">2300 Red River St. Stop D1100</font></div><div style="font-size:12.8px"><font color="#000000">Austin TX, 78712-1426</font></div><div style="color:rgb(136,136,136);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">(512) 232-8013</span></div></div></div></div></div></div></div>