[Archivesspace_Users_Group] Updating top container barcode via API
Trevor Thornton
trthorn2 at ncsu.edu
Thu Aug 25 11:03:01 EDT 2022
Those conflict errors might mean that you're adding a barcode that already
exists, which is restricted at the database level so there's no way around
it.
The standard (or at least a common) approach for doing updates via the API
is to first get the record you want to update, modify the JSON you get back
(to add the barcode in your case), then send that updated JSON with your
POST request.
When I went through the process of adding top container barcodes, I opted
to make the updates directly to the database because I found it to be
easier to script. Doing it this way requires you to update the Solr index
manually – removing data/indexer_state/6_top_container.dat should do that
(not sure if the '6' in that filename is consistent, but it will always end
with top_container.dat).
On Thu, Aug 25, 2022 at 10:38 AM Matthew Adair <mladair at umich.edu> wrote:
> Hi folks -
> I've been trying to come up with a routine to update barcodes in top
> containers via the API but so far, no luck. The server keeps returning a
> "409 conflict" error.
>
> Anybody know what the minimum requirements for the JSON payload would be
> to update a container barcode? Or, perhaps more details on the 409
> conflict error?
>
> Thanks,
> 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
> @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
>
--
Trevor Thornton
Applications Developer, Digital Library Initiatives
North Carolina State University Libraries
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20220825/93c92fa0/attachment.html>
More information about the Archivesspace_Users_Group
mailing list