[Archivesspace_Users_Group] Odd results with locations & API (ASpace 2.5.2)

Andrew Morrison andrew.morrison at bodleian.ox.ac.uk
Mon Nov 28 10:00:41 EST 2022


Some things you could try are checking whether the missing location's ID 
is missing from the list returned by this API call:

/locations?all_ids=true

Or if its URI is returned by this SQL:

SELECT * FROM deleted_records WHERE uri LIKE '%location%';

Andrew.


On 28/11/2022 14:25, Matthew Adair wrote:
> Greetings hive mind...
>
> I've been working on some utilities for creating and updating top 
> containers, locations, and barcodes via the API. I've run into an odd 
> situation and I cannot figure out what is going on...
>
> 1. This particular Location was created several years ago (2018), and 
> had a top container assigned to it.
> 2. Through the API, I recently assigned a location profile to it.
> 3. Examining the location through the interface, everything seems just 
> fine. (ie https://our_aspace_url.edu/locations/:ID)
> 4. The location shows up fine in the browse list of locations: 
> https://our_aspace_url.edu/locations?page=NNN
> 5. When I query the location directly in the api, the JSON is returned 
> as expected: https://our_aspace_API_url.edu/locations/:ID 
> <https://our_aspace_API_url.edu/locations/:ID>)
>
> Here is the kicker, when I page through all the locations via the API  
> ( https://our_aspace_API_url.edu/locations?page=NNN&page_size=250 
> <https://our_aspace_API_url.edu/locations?page=NNN&page_size=250> ), 
> this one location is not returned in the results. I thought it could 
> be an error in how my loops were constructed, but I have actually 
> examined all of the content returned from the server, and the location 
> URI is never included.
>
> Oddly enough, my code reports that a duplicate location URI is 
> returned by the server. I've verified this in the JSON returned while 
> paging through the results too. However, the duplicate URI changes 
> based on the value passed in the page_size parameter.
>
> Over the holiday break, we performed a re-index by deleting 
>  data/indexer_state and data/solr_index, then rebooting. No change in 
> the results.
>
> Any thoughts would be greatly appreciated.
>
> Matt
>
> ----*
> Matt Adair*
> Archivist for Digital Imaging and Infrastructure
>
>
> Bentley Historical Library
> 1150 Beal Avenue
> Ann Arbor, Michigan 48109-2113
> 734-647-3537
> http://bentley.umich.edu
> <http://bentley.umich.edu>@UmichBentley
>
> /The Bentley Historical Library acknowledges that coerced cessions of 
> land by the Anishnaabeg and Wyandot made the University of Michigan 
> possible, and we seek to reaffirm the ancestral and contemporary ties 
> of these peoples to the lands where the University now stands.
> /
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> 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/20221128/71b4dbb3/attachment.html>


More information about the Archivesspace_Users_Group mailing list