<div dir="ltr">Thanks,<div><br></div><div>Thanks, I did try that. The resources endpoint is expecting an :id, and the api returns: <span style="font-variant-ligatures:no-common-ligatures;font-family:menlo;font-size:11px">{"error"=>{"id"=>["Wanted type Integer but got 'search'"]}}</span></div>







<div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><font face="verdana, sans-serif">Don</font></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Nov 9, 2016 at 11:53 AM, Valerie Addonizio <span dir="ltr"><<a href="mailto:vaddoniz@jhu.edu" target="_blank">vaddoniz@jhu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_344664638450109941WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">This is only a guess, but including the endpoint for Resource may do it, here, in your string:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt">repositories/3/<span style="color:red">resources/</span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-<wbr>bounces@lyralists.lyrasis.org</a> [mailto:<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_<wbr>group-bounces@lyralists.<wbr>lyrasis.org</a>]
<b>On Behalf Of </b>Donald Mennerich<br>
<b>Sent:</b> Wednesday, November 09, 2016 11:43 AM<br>
<b>To:</b> <a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@<wbr>lyralists.lyrasis.org</a><br>
<b>Subject:</b> [Archivesspace_Users_Group] limiting API search query to specific record types<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">AUG:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I am trying to get resource records from the ASpace API, I'm currently using the advanced query example that Chris had posted in 2015.<u></u><u></u></p>
<div>
<table class="m_344664638450109941MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:4.5pt 0in 4.5pt 0in">
<table class="m_344664638450109941MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:4.5pt 0in 4.5pt 0in">
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><span style="font-size:9.5pt">response = client.get('repositories/3/<wbr>search?page=1&aq={"query":{"<wbr>field":"title","value":"Jeremy Blake Papers", "jsonmodel_type":"field_query"<wbr>,"negated":false,"literal":<wbr>true}}')<u></u><u></u></span></p>
</blockquote>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<p class="MsoNormal">While this returns the wanted resource record, the api also returns an accession record and a collection control management. So my question: how can I filter to just resource records? I see in the json for any record has a field to  "type"=>["resource"],
 and there's documentation in the API about using this field in an advanced query:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:#333333;background:white">[String] type – The record type to search (defaults to all types if not specified)</span><u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I've tried adding a "type" parameter to a query in numerous ways, such as:<u></u><u></u></p>
</div>
<table class="m_344664638450109941MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:4.5pt 0in 4.5pt 0in">
<table class="m_344664638450109941MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:4.5pt 0in 4.5pt 0in">
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><span style="font-size:9.5pt">response = client.get('repositories/3/<wbr>search?page=1&aq={"query":{"<wbr>field":"title","value":"Jeremy Blake Papers", "jsonmodel_type":"field_query"<wbr>,"negated":false,"literal":<wbr>true,
<b><span style="color:red">"type": ["resource"] </span></b>}}')<u></u><u></u></span></p>
</blockquote>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Can anyone provide some guidance on how to limit results from the search API to specific record types?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Don<u></u><u></u></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>

<br>______________________________<wbr>_________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@<wbr>lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" rel="noreferrer" target="_blank">http://lyralists.lyrasis.org/<wbr>mailman/listinfo/<wbr>archivesspace_users_group</a><br>
<br></blockquote></div><br></div></div>