[Archivesspace_Users_Group] Example of programmatically updating /agents/people via REST?
rsdoiel at caltech.edu
Wed Apr 20 14:10:25 EDT 2016
Sorting out the model structure I found using Stephen Dolan’s jq to be vary helpful. I would curl the request to get the agent I wanted to update. Tweak the resulting JSON, check it with jq, then send it back via curl.
I found the following very helpful too
+ https://www.youtube.com/watch?v=z0HR46q4F8o - A screen cast of using the API via curl
All the best,
(P.S. This week’s a bit busy but I’ll see if I can whip up a Python demo showing what you ask too)
R. S. Doiel, <rsdoiel at caltech.edu>
Digital Library Development
On 4/20/16, 10:45 AM, "archivesspace_users_group-bounces at lyralists.lyrasis.org on behalf of Mark Cyzyk" <archivesspace_users_group-bounces at lyralists.lyrasis.org on behalf of mcyzyk at jhu.edu> wrote:
>Does anyone have a really good and clear example of how to update
>/agents/people via the REST API? If so, I would love to see it.
>We've extracted a chunk of JSON using the API, have modified parts of
>it, and now want to push it back in.
>It's looking like, in order to do this, the pseudo-code would be
>Read edited JSON file
>Start a session with the ASpace server
>Begin loop over parsed JSON
> Post each /agent/people item individually using its ID
>Spin in chair
>That's what I'm working on now (but would love to see a working example
>[in Ruby or Python, preferably]).
>Mark Cyzyk, M.A., M.L.S.
>Scholarly Communication Architect
>User Interface Applications Group
>The Sheridan Libraries
>The Johns Hopkins University
>mcyzyk at jhu.edu
>Archivesspace_Users_Group mailing list
>Archivesspace_Users_Group at lyralists.lyrasis.org
More information about the Archivesspace_Users_Group