[Archivesspace_Users_Group] Get Archival Objects for a Top Container Using the API
Corey Schmidt
Corey.Schmidt at uga.edu
Mon Jan 9 11:25:47 EST 2023
Dear all,
How would I go about getting all of the associated archival objects for a top container using the API? Would doing something like the following capture all archival objects:
search_aos = client.get_paged(f'repositories/4/search', params={'q': f'{topcontainer_barcode}', 'type': ['archival_object']})
ao_results = [result for result in search_aos]
The above works (returns 27 archival objects, exactly what is shown in ASpace), but I am concerned this won't get everything or potentially get unassociated archival objects. I tried a different query, one based on how the staff interface displays linked records in a top container view, but this kind of query returns all archival objects for a repository, not the ones connected to the top container:
search_aos = client.get_paged(f'repositories/4/search', params={'filter_term[]': f'top_container_uri_u_sstr: {topccontainer_uri}', 'type': ['archival_object']})
Any help/advice is appreciated!
Thanks,
Corey
Corey Schmidt
Special Collections Libraries | Project Management Librarian/Archivist
Corey.Schmidt at uga.edu<mailto:Corey.Schmidt at uga.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20230109/9f0d39f5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ASpace-ao_tc-results.png
Type: image/png
Size: 128045 bytes
Desc: ASpace-ao_tc-results.png
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20230109/9f0d39f5/attachment.png>
More information about the Archivesspace_Users_Group
mailing list