[Archivesspace_Users_Group] Search Across Repositories and Get EAD XML - ArchivesSpace API

Majewski, Steven Dennis (sdm7g) sdm7g at virginia.edu
Mon Mar 9 12:42:50 EDT 2020


I would also add that if you want the EAD, it may be simpler to access it from the OAI endpoint, but only if OAI is configured properly. Try downloading a resource using oai_ead metadata from the oai/sample page, to see if it’s configured properly and what the resource URLs will look like. 

— Steve M.



> On Mar 9, 2020, at 10:39 AM, Corey Schmidt <Corey.Schmidt at uga.edu> wrote:
> 
> Dear ArchivesSpace Members,
> 
> 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.
> 
> I have two questions about how to utilize the ArchivesSpace API. First, I want to use the Search across repositories <https://archivesspace.github.io/archivesspace/api/#search-across-repositories> 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:
> 
>      client.get('search/repositories?type="resource"&q=ms954&all_ids=true')
>      client.get('/search/repositories?q=ms954&type="resource"&all_ids=true')
> 
> Second, I want to download an EAD xml file directly from the API using this endpoint: Get an EAD representation of a Resource <https://archivesspace.github.io/archivesspace/api/#get-an-ead-representation-of-a-resource>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:
> 
>      request_ead = client.get('repositories/5/resource_descriptions/5734.xml?include_unpublished=false&include_daos=true&numbered_cs=true&print_pdf=false&ead3=false')
> 
> Any help would be greatly appreciated!
> 
> Sincerely,
> 
> Corey
>  
> Corey Schmidt
> ArchivesSpace Project Manager | University of Georgia Libraries
> Email: Corey.Schmidt at uga.edu <mailto:Corey.Schmidt at uga.edu>
> Phone: +1-706-542-8151
>  
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org <mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group <http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200309/cd09aba2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3342 bytes
Desc: not available
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200309/cd09aba2/attachment.bin>


More information about the Archivesspace_Users_Group mailing list