<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.EmailQuote, li.EmailQuote, div.EmailQuote
{mso-style-name:EmailQuote;
mso-style-link:"EmailQuote Char";
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
border:none;
padding:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:#1F497D;}
span.EmailQuoteChar
{mso-style-name:"EmailQuote Char";
mso-style-link:EmailQuote;
color:#1F497D;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi Don,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">What version of ASpace are you running? I’m guessing either 1.4.2 with container management plugin or 1.5+…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">If that is the case, then the problem is that the data you are trying to change in the snippet below isn’t actually controlled from within “container” anymore.
You’ve actually got to look for & change the “sub_container” and/or the “top_containers” record linked to from “sub_container”:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">"instances": [<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> "sub_container": {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> "indicator_2": "2",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> "type_2": "folder",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> "jsonmodel_type": "sub_container",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> "top_container": {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> "ref": "/repositories/3/top_containers/12063"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> ]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">So, in the blob you provide below, type_1, indicator_1, and barcode_1 could be modified by POSTing to the linked top_container record, and type_2 and indicator_2
could be changed by POSTing the AO back with modifications to sub_container instead of container.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Yes, it’s a pain. I’m spending the ocassional down moment working on a script to automate some of this for us here (GET record, dump into a csv, processing archivists
make changes in csv, then it POSTs back to the proper records/subrecords), but it is no where ready for primetime yet, and won’t be for a while.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Though, if anyone has this work already complete, I’m all ears!
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">J</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Lora<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> archivesspace_users_group-bounces@lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org]
<b>On Behalf Of </b>Donald Mennerich<br>
<b>Sent:</b> Monday, May 22, 2017 4:11 PM<br>
<b>To:</b> Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject:</b> [Archivesspace_Users_Group] Updating containers via archival_object POST<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello List, <o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I'm working a data remediation problem via the aspace API I can't seem to get any of the values in a container key within an archival_object to update when I post. For example, within a json object of type archival_object
like:<br>
<br>
<span style="font-family:"Courier New"">"container": {<br>
"type_1": "box",<br>
"indicator_1": "1",<br>
"barcode_1": "31142054615128",<br>
"type_2": "folder",<br>
"indicator_2": "14",<br>
"container_locations": [],<br>
"lock_version": 25<br>
}</span><o:p></o:p></p>
</div>
<p class="MsoNormal">If I change any of the values and POST, none of the updates seem to persist. This doesn't generate an errors, and any changes to the record otherwise seems to save. I'm wondering if this is just not possible, and if so, is there another
endpoint that might be used to update container information?<br>
<br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif">Thanks, Don</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>