URL updates

132 views
Skip to first unread message

Tom Hanstra

unread,
Jun 18, 2024, 3:01:09 PMJun 18
to Archivesspace Users Group
We have a number of ArchivesSpace entries which use remote URLs to point to the actual location of the object. For instance, we have a records like this:

https://archivesspace.library.nd.edu/repositories/3/archival_objects/784373

in which the actual object is a URL pointing to an object on our rarebooks server. 

We are working on a project which is going to move a number of these objects to a new server and thus a new URL. We would prefer to simply update the database to change the current location URL to the new URL and I have a 1:1 spreadsheet with the updated locations. 

Is this possible?  If so, what table (or tables) would have the data which needs to be updated?

Or is this a dangerous update which could cause some issues? Is there a better/preferred way to make such changes?

Thanks in advance for any help you can provide,
Tom
--


Tom Hanstra
Sr. Systems Administrator


Clair, Kevin

unread,
Jun 18, 2024, 3:03:40 PMJun 18
to Archivesspace Users Group
Hi Tom,

Do you have API access? I make updates like this through the API all the time; I think that would be far preferable to making updates directly in the database. I'm not sure exactly how you have your spreadsheet set up, but I could share some examples of update scripts I've written (they're all done in Python using the ArchivesSnake library).  -k

From: 'Tom Hanstra' via Archivesspace_Users_Group <Archivesspac...@lyrasislists.org>
Sent: Tuesday, June 18, 2024 3:00 PM
To: Archivesspace Users Group <archivesspac...@lyrasislists.org>
Subject: [ArchivesSpace Users Group] URL updates
 
--
You received this message because you are subscribed to the Google Groups "Archivesspace_Users_Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Archivesspace_User...@lyrasislists.org.
To view this discussion on the web visit https://groups.google.com/a/lyrasislists.org/d/msgid/Archivesspace_Users_Group/CAA60kZNdckdP_BReC-_wn4CF17Xn%2Bvh5r4UeZ5S5RkBAPGvDvw%40mail.gmail.com.

Blake Carver

unread,
Jun 18, 2024, 3:09:57 PMJun 18
to Archivesspace Users Group
 I'm with Kevin that the API is probably the way to go, but if you can't API that, the file_version table has a file_uri that holds those uris. (assuming I understand what you're wanting to change here)

From: archivesspac...@lyrasislists.org <archivesspac...@lyrasislists.org> on behalf of Clair, Kevin <km...@psu.edu>
Sent: Tuesday, June 18, 2024 3:03 PM
To: Archivesspace Users Group <Archivesspac...@lyrasislists.org>
Subject: Re: [ArchivesSpace Users Group] URL updates
 

Tom Hanstra

unread,
Jun 18, 2024, 3:16:27 PMJun 18
to Blake Carver, Archivesspace Users Group
Ah, thanks Blake. That was what I was looking for.

My understanding is that there is concern with other ID numbers changing if the API updates are performed. Does the API basically re-insert with the updates?  Does that change some related ID numbers? 

We have a secondary database which references ArchivesSpace by one of these IDs, and the concern is that a change to the ID would leave those values hanging. 

Any problem with just updating that database table?

Thanks,
Tom

Kara Hart

unread,
Jun 18, 2024, 4:26:58 PMJun 18
to Tom Hanstra, Blake Carver, Archivesspace Users Group
I was just looking at doing something similar.  After running a test and changing some URLs using PHPMyAdmin, I had to do a reindex before they displayed in the UI, but not a full one.  I just deleted these directories in the /data/ directory:

/data/indexer_state/2_digital_object.dat

/data/indexer_pui_state/2_digital_object.dat

/data/indexer_pui_state/2_digital_object_component.dat


I didn't find any problems doing it this way, I tested on my test instance, but I'm NO expert.  

HTH, Kara


~~~~~ Kara S. Hart 

Systems Librarian - Library & Technology Services 
Wellesley College


Cowing [he], Jared

unread,
Jun 18, 2024, 5:29:56 PMJun 18
to Archivesspace Users Group
We did something similar also by using the API (and Python) when we moved our digital collections platform from Islandora to Alma Digital. You replace the object's XML with a new copy of that XML which includes any desired changes. The object's identifiers did not change. The process was slightly complexified by having to make sure that both object URLs and thumbnail URLs were updated correctly. It helped for us to have a sandbox to try this on before running the process on production.

I generally like the idea of going through the API for this to invoke the same sort of built-in validation & commit processes that you'd invoke when making edits in the staff interface, just in case (for example) object edits are supposed to result in additional changes to the database beyond the file_uri field. Updating through the API at the very least also resulted in updates to the information about when the object was last modified and by who.



--

Jared Cowing | Systems Librarian | he/him
WILLIAMS LIBRARIES  | Williamstown, MA (413)597-3061

Cowing [he], Jared

unread,
Jun 18, 2024, 6:31:10 PMJun 18
to Archivesspace Users Group
Apologies, my response should of course have said JSON instead of XML (my mind is on a similar bulk update process we run with Alma's APIs).
Reply all
Reply to author
Forward
0 new messages