[Archivesspace_Users_Group] expanding fields available to create digital objects - API
Steele, Henry
Henry.Steele at tufts.edu
Tue Jun 20 15:55:19 EDT 2017
Thank you very much for your response. I see the error I made was mistakenly trying to include user-defined fields in an array, when they are only in a hash. But your response let me know that these fields are available for update, and not to take the API documentation too literally.
From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Lora Davis
Sent: Tuesday, June 20, 2017 10:45 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] expanding fields available to create digital objects - API
Hi Henry,
I'm not familiar with that plugin, but, in general, posting in that information through the API should not be a problem (I have several scripts that do this).
As long as you construct JSON that generally looks like this, you should be golden.
{
"digital_object_id": "Your digital object identifier",
"title": "Your title",
"jsonmodel_type": "digital_object",
"file_versions": [
{
"file_uri": "Your file uri",
"publish": false,
"checksum": "Your checksum",
"checksum_method": "sha-256",
"jsonmodel_type": "file_version"
}
],
"user_defined": {
"string_1": "Your string 1",
"jsonmodel_type": "user_defined"
}
}
For what it's worth, I've found that it is best not to take the existing API documentation as a hard and fast rule for what can/cannot be done via the API. The documentation is more an overview map, than it is a list of turn-by-turn directions. I keep a local instance of ASpace running that I can throw things at using scripts and/or GUI API clients like Postman (https://www.getpostman.com/) or any number of browser add-ons/extensions. Starting by trying to do the thing I want to do on a small scale before ramping up has routinely paid me dividends and shown me possible solutions I would have never thought of were I just going off of existing documentation.
Best,
Lora
Lora J. (Davis) Woodford
Digital Archivist
The Sheridan Libraries
Johns Hopkins University
3400 North Charles Street
Baltimore, MD 21228
(410) 516-5898
lwoodford at jhu.edu
From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Steele, Henry
Sent: Tuesday, June 20, 2017 9:49 AM
To: archivesspace_users_group at lyralists.lyrasis.org
Subject: [Archivesspace_Users_Group] expanding fields available to create digital objects - API
Good morning,
I assist Digital Collections & Archives at Tufts University with ArchivesSpace administration. I have recently been working on a modification to the Digital Object Manager plugin developed by Kevin Clair at Duke University. Digital Collections & Archives uses the DOM to update digital objects, but they asked me for a way to create digital objects from a larger input CSV with more fields.
Using the API, I modified a local version of DOM so that it would create a digital object with the following fields, using the post method for digital objects:
- Title
- digital object identifier
- file_uri
- restrictions
Using another method, I was able to set the digital object to publish, including the subrecords.
However, there are a few fields we would like to add to the new digital object that appear they may not be supported in the create digital object method in the API. The API documentation doesn't list these fields in the JSON under the Create Digital Object method.
The most important field we want to include is "Checksum" but also would like to add:
- checksum (mentioned above)
- user_defined_string_1 (we're using this for location)
- digital_object_level
- checksum method
More broadly, is it possible to expand the number of fields available in digital object creation, or in a subsequent update of the new digital object?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20170620/4e71fbcd/attachment.html>
More information about the Archivesspace_Users_Group
mailing list