I don't see a specific endpoint for location by barcode, but I think you could 
hit the generic search endpoint with the following. It's going to show all 
locations that match that particular string, so not guaranteed that you'll only 
get one result.

/search/repositories?filter_term[]={"primary_type"%3A"location"}&q={MY_BARCODE}&sort=score+desc

This is across all repos, so you could also limit to a specific repo by

/repositories/{REPO_ID}/search?filter_term[]={"primary_type"%3A"location"}&q={MY_BARCODE}&sort=score+desc

Joshua
________________________________
From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
<archivesspace_users_group-boun...@lyralists.lyrasis.org> on behalf of Matthew 
Adair <mlad...@umich.edu>
Sent: Monday, December 13, 2021 3:27 PM
To: Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org>
Subject: [Archivesspace_Users_Group] ASpace API - Query by Location Barcode?

Maybe I just haven't figured it out yet, but is there a way in the API to 
return information about a Location by searching by it's barcode?

Thanks,
- Matt

----
Matthew Adair
Lead Archivist for Digital Imaging and Infrastructure
[Due to working remotely, email is the best method to reach me.]

[https://docs.google.com/uc?export=download&id=1OAXggdOikJu9Gk1yHxKSXoZJ99A4RAqz&revid=0Bw_nuz0O5gALekV3cHNpMWkrd0dYSWQ1Vyt4Mzc2cU43YmpZPQ]
Bentley Historical Library
1150 Beal Avenue
Ann Arbor, Michigan 48109-2113
734-647-3537
http://bentley.umich.edu
<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbentley.umich.edu%2F&data=04%7C01%7Cjoshua.d.shaw%40dartmouth.edu%7C0d909a4cafd749bc1ec008d9be770004%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637750241320782135%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=HsbWnZDSfbVbZHsQoicCre7kZm0QtUipumpoG026T2s%3D&reserved=0>@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@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

Reply via email to