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: [email protected]<mailto:[email protected]> Phone: +1-706-542-8151
_______________________________________________ Archivesspace_Users_Group mailing list [email protected] http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
