[Archivesspace_Users_Group] Publishing, Suppressing, or Unpublishing?

Corey Schmidt Corey.Schmidt at uga.edu
Fri May 28 08:33:01 EDT 2021


I had to unpublish a host of records before. You can use the update a resource API endpoint (https://archivesspace.github.io/archivesspace/api/#update-a-resource) to do that. Just grab the resource first (https://archivesspace.github.io/archivesspace/api/#get-a-resource), then in the returned json, set publish = False. Then use that update a resource endpoint to push that change to ASpace. That should trigger Solr to update that in the index to not show up in the PUI.

I wrote a script<https://github.com/uga-libraries/aspace_scripts/blob/master/unpublish_records.py> that unpublishes a resource and all its archival objects if the identifier contains "[CLOSED]". It's not as elegant as some other scripts you'll see out there, but it may be helpful.



Corey Schmidt
ArchivesSpace Project Manager
University of Georgia Special Collections Libraries
Email: Corey.Schmidt at uga.edu
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Dyson-Smith, Bridger <bdysonsm at utk.edu>
Sent: Thursday, May 27, 2021 1:05 PM
To: archivesspace_users_group at lyralists.lyrasis.org <archivesspace_users_group at lyralists.lyrasis.org>
Subject: [Archivesspace_Users_Group] Publishing, Suppressing, or Unpublishing?


Hi all -

I have a set of resources that need to be removed from the PUI - they
were published in error. Initially I had thought that setting their
`published` status in the database from `1` to `0` (and updating the
`system_mtime` would be sufficient for a reindex (where these resources
would be removed from Solr and not reindexed).

Is there a programmatic way to handle this, or something through the
API? I have an idea, but it feels hacky and wrong, and the alternative
seems to be something along the lines of:
1. visit each resource in the staff UI
2. select 'Publish?' at the Basic Information level
3. save
4. deselect 'Publish?'
5. save

Thanks in advance for your thoughts!
Bridger Dyson-Smith
University of Tennessee Libraries

Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20210528/27b2fad8/attachment.html>

More information about the Archivesspace_Users_Group mailing list