<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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1224827757;
mso-list-type:hybrid;
mso-list-template-ids:-8889992 765501950 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri",sans-serif;
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Donnelly,<br>
<br>
Sorry for a belated reply, but I thought someone else might get to this one sooner.<br>
<br>
As to the first part of the question – how to find suppressed records – I can think of three different ways to go about doing this that each have their pros/cons depending on your setup there, the number of repositories you have, the permissions of various
users, and your access to and/or level of comfort with the underlying ArchivesSpace database and/or the API.<br>
<br>
1) You can get the Staff interface to return a normal looking set of search results for resources with the status of suppressed by slightly altering the existing URL you get when you do the following:<o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">Browse > Resources<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">Use the left sidebar to filter to Published<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">Change the “published” in the URL to “suppressed”<o:p></o:p></li></ul>
<p class="MsoNormal">So, in test.archivesspace.org, I can see all the suppressed records in the YNHSC repository by visiting:
<a href="http://test.archivesspace.org/staff/resources?filter_term%5B%5D=%7B%22suppressed%22%3A%22true%22%7D">
http://test.archivesspace.org/staff/resources?filter_term%5B%5D=%7B%22suppressed%22%3A%22true%22%7D</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This has two drawbacks as far as I can see. 1) the results will be limited to the current repository to which you are logged in; and 2) actually doing something with the list of results could be somewhat manual and require a lot of clicking.
But, if you are most comfortable in the staff interface and/or only have access to the staff interface, this might be your best approach.<br>
<br>
2) Second, you can go a step further and use the API search endpoints to return a full listing of all the resource records with a suppressed status of true. Assuming the user that you log into the API with has full permissions to view suppressed records across
all repositories, this has the added benefit of returning all hits across your entire installation of ArchivesSpace. Similarly, you could build upon this API call to programmatically do the rest of your request – export the relevant records and/or delete
them – by writing a script that iterates through the results that you get by this initial search request. Obviously, the barrier to entry is higher here, but I suspect many of the API knowledgeable folks and/or folks working on the ArchivesSnake library,
or, possibly, others who have done exactly this type of task could get you started on your way and/or share their prior work in this area.<br>
<br>
A query returning the suppressed records on test.archivesspace.org would look something like this (line breaks added so that it’d be easier to read): http://test.archivesspace.org/staff/api/search?page=1&filter={"query": {"op":"AND", "subqueries":[{"jsonmodel_type":"field_query","field":"primary_type","value":"resource","literal":true},<o:p></o:p></p>
<p class="MsoNormal">{"jsonmodel_type":"field_query","field":"suppressed","value":"true","literal":true}],"jsonmodel_type":"boolean_query"},<o:p></o:p></p>
<p class="MsoNormal">"jsonmodel_type":"advanced_query"} <br>
<br>
Note that search results are paged, so if you have a ton of suppressed records, you’ll have to iterate over many pages of results. You can set the page_size (equal to or less what the max_page_size is set to in your config.rb) as an additional parameter to
your request.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">3) Finally, if you have access to your database (ideally a read-only copy of your database when initially testing) you can use something along the lines of the following sequel query to return all resources with a suppressed status of true
(or, in the case of the DB, `1`). This would work across repositories and then, as with option 1 above, you could choose how you wish to proceed with this list from there.<br>
<br>
SELECT * FROM resource WHERE suppressed=1;<br>
<br>
Hope others chime in with how they’ve tackled similar projects, and happy to follow up if you have other questions.<br>
<br>
Best,<br>
<br>
Lora<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Lora J. Woodford<o:p></o:p></p>
<p class="MsoNormal">Junior Developer<o:p></o:p></p>
<p class="MsoNormal"><a href="mailto:lora.woodford@lyrasis.org"><span style="color:#0563C1">lora.woodford@lyrasis.org</span></a><o:p></o:p></p>
<p class="MsoNormal">800.999.8558 x4808<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none">Cell: 404.877.8158<br>
<br>
<img border="0" width="175" height="40" style="width:1.8229in;height:.4166in" id="Picture_x0020_1" src="cid:image001.png@01D638EB.EB5A6C10" alt="signature_658561908"><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of "Walton, Donnelly" <dfwalton@ua.edu><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Tuesday, May 26, 2020 at 1:02 PM<br>
<b>To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>[Archivesspace_Users_Group] searching for suppressed records?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div id="divtagdefaultwrapper">
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<div>
<div>
<div>
<p><span style="color:black"> </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><o:p></o:p></span></p>
<p><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><o:p> </o:p></span></p>
<p><span style="color:black"> Hi!</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><o:p></o:p></span></p>
<p><span style="color:black">Is there a way to search for suppressed resource records? We have suppressed hundreds for a project. I want to find them, export the data as XML or PDF (maybe both), and delete them. </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><o:p></o:p></span></p>
<p><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><o:p> </o:p></span></p>
<p><span style="color:black">Thanks,<br>
Donnelly Walton</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><o:p></o:p></span></p>
<p><span style="color:black">University of Alabama Libraries Special Collections</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>