[Archivesspace_Users_Group] Creating enumeration values via API

Dallas Pillen djpillen at umich.edu
Fri Oct 21 14:24:56 EDT 2016


Hi Alexander,

We had a script that did just that using the update enumeration endpoint
(POST /config/enumerations/:enum_id) by first getting the enumeration's
JSON object, adding new enumeration values to the enumeration's "values"
array, and posting the updated JSON (see example gist
<https://gist.github.com/djpillen/4dd8f3b2e4672a1874c8ac8c646037db>). This
handles the creation of new enumeration_values; they do not need to be
created separately.

On Fri, Oct 21, 2016 at 2:01 PM, Alexander Duryee <alexanderduryee at nypl.org>
wrote:

> As part of our deployment process, I would like to have a script that
> automatically adds new enumeration values to certain enumerations.
> Querying on the /config/enumerations/:enumeration_id endpoint returns a
> JSON object that ensconces a number of enumeration_value objects, so it
> seems like I need to create the enumeration_value, then add that to the
> enumeration.  However, there seem to be no endpoints for creating new
> enumeration_value objects.  Is there another method that I should be using
> to create/update enumerations with new values via the API?
>
> Thanks,
> --Alex
>
> --
> Alexander Duryee
> Metadata Archivist
> New York Public Library
> (917)-229-9590
> alexanderduryee at nypl.org
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>


-- 

*Dallas Pillen*Assistant Archivist for Metadata and Digital Projects


  Bentley Historical Library <http://bentley.umich.edu/>
  1150 Beal Avenue
  Ann Arbor, Michigan 48109-2113
  734.647.3559
  Twitter <https://twitter.com/umichBentley> Facebook
<https://www.facebook.com/bentleyhistoricallibrary>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20161021/ffec2006/attachment.html>


More information about the Archivesspace_Users_Group mailing list