<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:"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:Georgia;
panose-1:2 4 5 2 5 4 5 2 3 3;}
@font-face
{font-family:Constantia;
panose-1:2 3 6 2 5 3 6 3 3 3;}
/* 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:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:black;}
.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;}
--></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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Hi Karen and Paul,<br>
<br>
2 ways come to mind for me: 1) Using the database, if you have access to it. 2) Using the API.<br>
<br>
For using the database, it would be the quickest and easiest provided you have access to it via your hosting provider. If you do and are familiar with SQL, something like the following would work:
<br>
<br>
SELECT * FROM archival_object WHERE root_record_id = 704 AND (level_id = 892 OR level_id = 890)<br>
<br>
root_record_id is the ASpace ID for the resource you are trying to isolate. level_id is whether the archival object is a “item” or a “file” – in the example, it searches for objects with either “item” or “file” level. I use MySQL Workbench and it gets me the
# of objects returned for a quick and easy count.<br>
<br>
For using the API, you don’t need special permissions from your hosting provider, so you can access the API just as easily as you would any data from the staff interface. This would be more involved, as you would need to write a script to execute, but if you’re
familiar with Python or something of the like, it can be done. There are 2 endpoints that would seem useful for this:
<a href="https://archivesspace.github.io/archivesspace/api/#get-the-list-of-uris-of-this-published-resource-and-all-published-archival-objects-contained-within-ordered-by-tree-order-i-e-if-you-fully-expanded-the-record-tree-and-read-from-top-to-bottom">
Get the list of URIs of this published resource and all published archival objects contained within</a>, or
<a href="https://archivesspace.github.io/archivesspace/api/#fetch-tree-information-for-the-top-level-resource-record">
Fetch tree information for the top-level resource record</a>. The first endpoint would be good for getting all items that are published in a collection, but may include archival objects that are Series, sub-Series, etc. (aka not real items) and it excludes
unpublished items. The second gets top level items, but if you have series, sub-series with children, then you would have to iterate through each of those to get an accurate count of every item (published or unpublished). Thankfully that endpoint gives you
the data to point to those series/parents of children as precomputed waypoints, I believe, but it’s the more involved of the 2 endpoints to get right.
<a href="https://github.com/uga-libraries/aspace_scripts/blob/master/check_child_counts.py">
Here’s an example</a> when I used that endpoint to get all item counts that were greater or equal to 1000.<br>
<br>
Paul’s way of doing it is straightforward and easy, so if that works, then that’s what I would recommend.<br>
<br>
Hope this helps,<br>
<br>
Corey<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<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 <archivesspace_users_group-bounces@lyralists.lyrasis.org>
<b>On Behalf Of </b>Paul Sutherland<br>
<b>Sent:</b> Friday, September 23, 2022 10:50 AM<br>
<b>To:</b> Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] [External] Collection item count?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:#BA0C2F">[EXTERNAL SENDER - PROCEED CAUTIOUSLY]</span><o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Georgia",serif">Hi Karen,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Georgia",serif">I would also like to know how to generate a report like this, but a quick approach in the meantime I've used before: export the collection as EAD, and search
<i>level="item" </i>(or file, or whichever else) within the resulting EAD.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Georgia",serif">Best,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Georgia",serif">Paul<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Sep 23, 2022 at 10:35 AM Karen Urbec <<a href="mailto:karen.urbec@whoi.edu">karen.urbec@whoi.edu</a>> wrote:<o:p></o:p></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">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Everyone,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I have what I thought would be a simple question, but it turns out is not so easy. I’m trying to get a complete item count from a collection, and I can’t see where that is listed
or how to generate that report. I see where I can calculate the extent of each series, though those numbers don’t match what is in the series, so it’s unclear how that number is being calculated. This feels like such a simple question—I just want to know how
many individual items are in a full collection, but we can’t seem to figure it out. Any help would be much appreciated!<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Karen<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Constantia",serif;color:black">Karen Urbec (she/her)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Constantia",serif;color:black">Institution Archivist</span>,
<span style="font-size:10.0pt;font-family:"Constantia",serif;color:black">MBLWHOI Library</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Constantia",serif;color:black"><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.dla.whoi.edu_&d=DwMFAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=70gVc8PkZ8LRd0WR_N4Lh2vwCTUp-4jc9IXouEpQ4Go&m=Rnof0V_8dF2SSnx87z3t24T9RgaGs6I68nqfaHsda3I&s=5C-WWCkA-lM0yH2SlCEexe6H3zyzooInWRAyfuCJ0L8&e=" target="_blank" title="https://www.dla.whoi.edu/">Data
Library and Archives</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Constantia",serif;color:black">Woods Hole Oceanographic Institution
<br>
266 Woods Hole Road, MS#8, Woods Hole, MA 02543</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Constantia",serif;color:black">508-289-2269
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__orcid.org_0000-2D0001-2D6673-2D4478&d=DwMFAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=70gVc8PkZ8LRd0WR_N4Lh2vwCTUp-4jc9IXouEpQ4Go&m=Rnof0V_8dF2SSnx87z3t24T9RgaGs6I68nqfaHsda3I&s=qSbp388TjCHNqGzmVj-Aap5G-XcnCwyR3zDUBmLGBh4&e=" target="_blank" title="https://orcid.org/0000-0001-6673-4478">ORCID</a>
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<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="https://urldefense.proofpoint.com/v2/url?u=http-3A__lyralists.lyrasis.org_mailman_listinfo_archivesspace-5Fusers-5Fgroup&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=70gVc8PkZ8LRd0WR_N4Lh2vwCTUp-4jc9IXouEpQ4Go&m=Rnof0V_8dF2SSnx87z3t24T9RgaGs6I68nqfaHsda3I&s=YQX-6xZ7X0lHYQrkShkQIq_EHXiC1f3BmAAyzvWBcKc&e=" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__lyralists.lyrasis.org_mailman_listinfo_archivesspace-5Fusers-5Fgroup&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=70gVc8PkZ8LRd0WR_N4Lh2vwCTUp-4jc9IXouEpQ4Go&m=Rnof0V_8dF2SSnx87z3t24T9RgaGs6I68nqfaHsda3I&s=YQX-6xZ7X0lHYQrkShkQIq_EHXiC1f3BmAAyzvWBcKc&e=</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><b>Paul Sutherland</b> (he/his)<br>
Archivist of Indigenous Materials<br>
Center for Native American and Indigenous Research<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Library & Museum<br>
American Philosophical Society<br>
105 S. 5th Street, 2nd Floor<br>
Philadelphia, PA 19406<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Lenapehoking<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">215-440-3408<br>
<a href="http://amphilsoc.org/library/CNAIR" target="_blank">amphilsoc.org/library/CNAIR</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Browse our <a href="https://indigenousguide.amphilsoc.org" target="_blank">
Indigenous Subject Guide</a> <br>
and read our latest <a href="https://www.amphilsoc.org/blog-category/cnair" target="_blank">
blog posts</a><br>
Twitter: <a href="https://twitter.com/paulssutherland" target="_blank">@paulssutherland</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<img border="0" width="166" height="200" style="width:1.7291in;height:2.0833in" id="_x0000_i1025" src="https://ci3.googleusercontent.com/mail-sig/AIorK4wBPqaoU4xAkI9H3LHnr9vBpJnMtl-jAm9MEJ9OYvjMK7fy4sm3zA7fJ2DPumDhbjrnTiu46Vk"><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><i>Becoming Weatherwise </i>showing at the <a href="https://www.amphilsoc.org/visit-museum" target="_blank">
APS Museum</a>, 4/8-12/30<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><i>The APS has updated its <a href="https://www.amphilsoc.org/aps-covid-vaccine-and-masking-policies" target="_blank">
COVID responses</a>. APS buildings are open to staff and visitors, and it has expanded access to its Reading Room services. Please read our updated Reading Room policies on our
<a href="https://www.amphilsoc.org/library#paragraph-36" target="_blank">website</a>.</i><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><i><span style="font-family:"Arial",sans-serif"><br>
<br>
</span></i><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><i><span style="font-family:"Arial",sans-serif">I respectfully acknowledge that I work and reside in Lenapehoking, the homeland of the Lenape people in past, present, and future generations. I am grateful for the past and ongoing generosity
of numerous Indigenous communities and individuals who have offered guidance, expertise, and opportunities for collaboration that make my work possible.
</span></i><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>