<div dir="ltr"><div>Danielle,</div><div><br></div><div>It's probably possible to do this via SQL queries, but it would require a fairly complex query to effectively rebuild the Resource record. It would likely be easier to do this via requests against the API, which can return a list of all Resources in a repository; from there, you can query those Resources and extract their Extents.</div><div><br></div><div>After logging in via the API, you can use this endpoint to get a list of all Resources in a given repository:</div><div>https://[your-ASpace-API-address-here]/repositories/[repository_id]/resources?all_ids=true</div><div>(removing the brackets when substituting in your API address and repo ID)<br></div><div><br></div><div>This will return a list of Resource IDs. You can pass each one to the Resource endpoint:</div><div>https://[your-ASpace-API-address-here]/repositories/[repository_id]/resources/[resource_id]</div><div>(again, removing brackets)<br></div><div><br></div><div>This will return the full JSON representation of the Resource. The extent metadata lives in the 'extents' field; from there, you can extract the information that you need (e.g. the extent number, container summary, extent type, etc.).<br></div><div><br></div><div>Hope this helps - if you haven't worked with the API before, I'll be happy to send along tutorials/resources.</div><div><br></div><div>Thanks!</div><div>--Alex<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 25, 2019 at 6:05 PM Danielle Butler <<a href="mailto:dbutler@cals.org" target="_blank">dbutler@cals.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-2006414836779227165gmail-m_8009118902158589116WordSection1">
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif">I am trying to query our MySQL database to get a list of resource identifiers with corresponding extent numbers. I have been fighting with it for a while and I can get
a list of extent numbers with no associated resource information with included extents for accessions. With no apparent way to discern which is which (I don’t want both accessions and resource extent data because the data with be duplicative for processed
collections). I can get a list of resources, but without extent info. Does anyone know of a way to get both out of the database?
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif;color:rgb(31,78,121)">Danielle Butler, CA | Archivist<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif">Butler Center for Arkansas Studies | Central Arkansas Library System
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif"><a href="http://www.butlercenter.org/" target="_blank">www.butlercenter.org</a>
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif">100 Rock Street<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif">Little Rock, AR 72201<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Calibri Light",sans-serif">501-320-5724<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
_______________________________________________<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="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" rel="noreferrer" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_-2006414836779227165gmail_signature"><div dir="ltr"><div><div dir="ltr">Alexander Duryee<div>Metadata Archivist</div><div>New York Public Library</div><div>(917)-229-9590</div><div><a href="mailto:alexanderduryee@nypl.org" target="_blank">alexanderduryee@nypl.org</a></div></div></div></div></div>