[Archivesspace_Users_Group] Linking subjects to digital objects via the API
Olivia S Solis
livsolis at utexas.edu
Tue Mar 19 11:32:52 EDT 2019
Hi John,
I am not sure if there is a way to do this directly through the API, but my
team has come up with a way to do this through a Python script. We actually
modified a script written by Duke (thank you Noah Huffman if you are out
there!) to update major record types in ASpace. I use OpenRefine to
structure the data/JSON then export via its Custom Tabular Export feature.
I've tried to document my process in these two docs:
Using the scripts:
https://docs.google.com/document/d/12b9YN-_XFaFyEQivMm3g_9gMJ5tkm3JJMSg1fyLYUgA/edit?usp=sharing
Using the templates:
https://docs.google.com/document/d/1ulryK7V-_j-jQhIE_Dg3KqfCNexuUu8KHENLLz6njjs/edit?usp=sharing
The "update" scripts/templates post a completely new array/set of, in your
case e.g., linked subjects. The "append" ones tack on a subject to an
existing array of subjects.
I have actually only posted the update subject links (not append), and only
to resource records, but it should work if you change the resource endpoint
to a digital object endpoint (I would think... we don't use ASpace for
digital objects). But there is no reason why adapted an append subject
script wouldn't work. You will just need to know the digital object ASpace
IDs and the subject IDs you want to use.
Hopefully, my documentation is clearish, but it is drafty and not quite
ready for prime time! I think it can be adapted for different uses.
Thanks,
Olivia
On Mon, Mar 18, 2019 at 11:20 AM Rees, John (NIH/NLM) [E] <
reesj at mail.nlm.nih.gov> wrote:
> We’re trying to post-process digital objects and link existing subjects to
> them via the API, however there doesn’t seem to be a call to do this.
>
>
>
> Are we missing something? It seems doable for linked_agents and
> linked_events.
>
>
>
> Or is the preferred approach to insert subjects?
>
>
>
> https://archivesspace.github.io/archivesspace/api/#update-a-digital-object
>
>
>
> Thanks,
>
> John
>
>
>
> John P. Rees
>
> Archivist and Digital Resources Manager
>
> History of Medicine Division
>
> National Library of Medicine
>
> 301-827-4510
>
>
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
--
Olivia Solis, MSIS
Metadata Coordinator
Dolph Briscoe Center for American History
The University of Texas at Austin
2300 Red River St. Stop D1100
Austin TX, 78712-1426
(512) 232-8013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20190319/b8594ab1/attachment.html>
More information about the Archivesspace_Users_Group
mailing list