<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<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:Verdana;
panose-1:2 11 6 4 3 5 4 4 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;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Verdana",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif">Dear ArchivesSpace Members,<br>
<br>
Hello, my name is Corey Schmidt and I’m working as the ArchivesSpace Project Manager at the University of Georgia. I hope you all are doing well and having a good start to your week.<br>
<br>
I have two questions about how to utilize the ArchivesSpace API. First, I want to use the
<a href="https://archivesspace.github.io/archivesspace/api/#search-across-repositories">
Search across repositories</a> API endpoint searching with the resource identifier and take the results to get the URI for that resource. How do I structure my call to the API using the ASnake client (in python)? I have tried the following code with response
400 returned:<br>
<br>
client.get('search/repositories?type="resource"&q=ms954&all_ids=true')<br>
client.get('/search/repositories?q=ms954&type="resource"&all_ids=true')<br>
<br>
Second, I want to download an EAD xml file directly from the API using this endpoint:
<a href="https://archivesspace.github.io/archivesspace/api/#get-an-ead-representation-of-a-resource">
Get an EAD representation of a Resource</a> XML. How do I specify where the EAD xml file saves to? I’m not even sure if it is saving anywhere on my computer. However, my requests are successful, generating a 200 response. I tried turning the response into json
(using ASnake’s .json()) and writing it, but I keep getting a JSONDecodeError. This is my request:<br>
<br>
request_ead = client.get('repositories/5/resource_descriptions/5734.xml?include_unpublished=false&include_daos=true&numbered_cs=true&print_pdf=false&ead3=false')<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif"><br>
Any help would be greatly appreciated!<br>
<br>
Sincerely,<br>
<br>
Corey<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif">Corey Schmidt</span><span style="font-family:"Verdana",sans-serif"><br>
</span><i><span style="font-size:10.0pt;font-family:"Verdana",sans-serif">ArchivesSpace Project Manager</span></i><span style="font-size:10.0pt;font-family:"Verdana",sans-serif"> | University of Georgia Libraries<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#3B3838">Email:
</span><span style="font-size:10.0pt;font-family:"Verdana",sans-serif"><a href="mailto:Corey.Schmidt@uga.edu"><span style="color:#0563C1">Corey.Schmidt@uga.edu</span></a><span style="color:#3B3838"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#3B3838">Phone</span><span style="font-size:10.0pt;font-family:"Verdana",sans-serif">: +1-706-542-8151<span style="color:#404040"><o:p></o:p></span></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>