[Archivesspace_Users_Group] ArchivesSpace API questions

Noah Huffman noah.huffman at duke.edu
Mon Feb 17 10:59:51 EST 2020


Hi Alan,

You could do an advanced search via the API to target the EADID values in resource records.  Forming advanced queries isn't well documented (there are some old posts on the list with examples), but here's an example for querying the EADID field:

https://github.com/duke-libraries/archivesspace-duke-scripts/blob/master/python/asEADpublish_and_export_eadid_input.py#L40

With the above query, the API will return a result set (not an individual resource record), but assuming your EADIDs are unique, the target resource record should always be your first result.

-Noah

================
Noah Huffman
Archivist for Metadata, Systems, and Digital Records
David M. Rubenstein Rare Book & Manuscript Library
Duke University | 919-660-5982
http://library.duke.edu/rubenstein/
Pronouns: he / him / his





From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Huebschen, Alan M
Sent: Monday, February 17, 2020 10:03 AM
To: Archivesspace Users Group <Archivesspace_Users_Group at lyralists.lyrasis.org>
Subject: [Archivesspace_Users_Group] ArchivesSpace API questions


Hi all,



I've been working on a project to remigrate our original database from Archon to ArchivesSpace due to some top container issues in the first migration we ran. After our initial migration, changes were made in ArchivesSpace and those changes would not be present in the new migration. In an attempt to merge the changes from our old ASpace db to the new one, I've been working with the ArchivesSpace API via ArchivesSnake to pull JSON copies of any record that was modified after the original migration. My goal is to import these modified records to the newly migrated db, but I seem to have run into a problem.



After remigrating, it looks like the IDs of records have changed so it isn't as easy as deleting the unmodified record from the new migration and importing the modified JSON because their IDs do not match up. From what I saw in the ArchivesSnake and ASpace API docs, it appears that the only way to refer to a record is with that ID. Are there any other ways I can compare records through the API or am I stuck using the ID?



The only way I have been able to compare records to each other and find the new ID of the modified record is to iterate over all records in a specific category for each and every one of the records I am attempting to upload. This takes an incredibly long time. Theoretically I think I can load all IDs and records into local memory to iterate over rather than querying the ASpace API and this should speed up the process but I was wondering if anyone knew of a better way to accomplish this such as using EAD ID rather than ID through the API.



Thank you,



-Alan Huebschen

Brookens Library Information Systems

University of Illinois at Springfield
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200217/ffd43656/attachment-0001.html>


More information about the Archivesspace_Users_Group mailing list