<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class=""><br class="">
</div>
<div class="">I haven’t used that API endpoint, but for all of the ones that can take an array of values, for example accessing resources with id_set[] param, the URL syntax is something like:</div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"></span>/repositories/3/resources?id_set[]=230&id_set[]=223&id_set[]=222</div>
<div class=""><br class="">
</div>
<div class="">so for that endpoint, you probably want to append “?id[]=2” to the URL. </div>
<div class=""><br class="">
</div>
<div class="">And if you’re using curl, remember to use the ‘-g’ (glob off) option so it doesn’t interpret “[]” internally. </div>
<div class=""><br class="">
</div>
<div class="">— Steve. </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Mar 2, 2017, at 10:28 AM, Trevor Thornton <<a href="mailto:trthorn2@ncsu.edu" class="">trthorn2@ncsu.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">Hi everybody-</div>
<div class=""><br class="">
</div>
I'm trying to batch update container_profiles assigned to top_containers using the API endpoint documented here:
<div class=""><br class="">
</div>
<div class=""><a href="http://archivesspace.github.io/archivesspace/api/#post-repositories-repo_id-top_containers-batch-container_profile" class="">http://archivesspace.github.io/archivesspace/api/#post-repositories-repo_id-top_containers-batch-container_profile</a></div>
<div class=""><br class="">
</div>
<div class="">... and I'm having trouble passing the 'ids' parameter. The data type for this parameter is '[Integer]' (with the brackets). Everything I try results in an error complaining that the value I sent is a string and not an [Integer], eg:</div>
<div class=""><br class="">
</div>
<div class="">"Wanted type [Integer] but got '2'"<br class="">
</div>
<div class="">"Wanted type [Integer] but got '[2]'"<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Can anyone explain how to correctly format the parameters for this? Any insight is appreciated.<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">(BTW - we're using version 1.5.1.)<br clear="all" class="">
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Trevor</div>
<div class=""><br class="">
</div>
-- <br class="">
<div class="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">Trevor Thornton</font>
<div class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">Applications Developer, Digital Library Initiatives</font></div>
<div class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">North Carolina State University Libraries</font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
Archivesspace_Users_Group mailing list<br class="">
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br class="">
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<br class="">
</div>
</blockquote>
</div>
<br class="">
</body>
</html>