Corey, Thanks for that! I was reading through update-a-resource yesterday but discarded that since I didn't see publish explicitely in the API example. Whoops :).
I really appreciate your example, that's *very* helpful! Best, Bridger On Fri, 2021-05-28 at 12:33 +0000, Corey Schmidt wrote: > Bridger, > > 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 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. > > Sincerely, > > Corey > > Corey Schmidt > ArchivesSpace Project Manager > University of Georgia Special Collections Libraries > Email: corey.schm...@uga.edu > From: archivesspace_users_group-boun...@lyralists.lyrasis.org > <archivesspace_users_group-boun...@lyralists.lyrasis.org> on behalf of > Dyson-Smith, Bridger <bdyso...@utk.edu> > Sent: Thursday, May 27, 2021 1:05 PM > To: archivesspace_users_group@lyralists.lyrasis.org > <archivesspace_users_group@lyralists.lyrasis.org> > Subject: [Archivesspace_Users_Group] Publishing, Suppressing, or > Unpublishing? > [EXTERNAL SENDER - PROCEED CAUTIOUSLY] > > > 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! > Best, > Bridger > -- > Bridger Dyson-Smith > University of Tennessee Libraries > > _______________________________________________ > Archivesspace_Users_Group mailing list > Archivesspace_Users_Group@lyralists.lyrasis.org > http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group > _______________________________________________ > Archivesspace_Users_Group mailing list > Archivesspace_Users_Group@lyralists.lyrasis.org > http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group _______________________________________________ Archivesspace_Users_Group mailing list Archivesspace_Users_Group@lyralists.lyrasis.org http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group