[Archivesspace_Users_Group] help with API route for archival object notes
Karen Miller
k-miller3 at northwestern.edu
Tue Jun 30 18:22:44 EDT 2020
Good morning, ArchivesSpace users.
I am a cataloger (*not* a developer) using the API to update ArchivesSpace. So far I've figured out how to add LCCNs to the authority_Id of Agent records and do a couple more updates that, in retrospect, were pretty simple.
The next task I'd like to tackle, however, just seems like maybe it can't be done. We've got a lot of notes with html tags in them and I would like to update those to valid tags. I can get the JSON for the notes in any particular archival object, but I don't know how to specify the route to the note to change it. The JSON looks like this:
'notes': [{'content': ['This is a note with a bad <i>tag</i>'],
'jsonmodel_type': 'note_singlepart',
'persistent_id': '75ba0ec57e374b8b154551a69b4c311f',
'publish': True,
'type': 'abstract'},
{'jsonmodel_type': 'note_multipart',
'persistent_id': '66afa07b3214260078123236bbe1ff27',
'publish': True,
'subnotes': [{'content': 'This is a dippy note.',
'jsonmodel_type': 'note_text',
'publish': True}],
'type': 'scopecontent'}],
I got this using the route 'repositories/10/archival_objects/489763', but I don't know how to specify the note that I want in the JSON. For the agent authority_id I used the route ''/agents/people/<somenumber> and specified the field like this:
['names'][0]['authority_id']
I'm hoping this is an easy question for somebody with more experience with the API and (especially) with JSON than I. I'm a little afraid the answer is that it can't be done. Any advice will be appreciated!
Karen
Karen D. Miller
Monographic Cataloger/Metadata Specialist
Northwestern University Libraries
Northwestern University
1970 Campus Drive
Evanston, IL 60208
www.library.northwestern.edu
k-miller3 at northwestern.edu
874.467.3462
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200630/7073e5d8/attachment.html>
More information about the Archivesspace_Users_Group
mailing list