[Archivesspace_Users_Group] partially update a record through API
Mang Sun
mang.sun at rice.edu
Thu Nov 20 12:34:42 EST 2014
I am trying to partially update accession records by setting PUBLISH to
false using REST API, but I can't get it done successfully.
For example, run the following command to update one accession record,
curl_as username password -d "@accession.json" -v "the AS API
url/repositaries/2/accession/1"
accession.json contains
{
"publish" : false
}
but I get the following complaints
{"error":{"id_0":["Property is required but was
missing"],"accession_date":["Property is required but was
missing"]},"warning":null,"invalid_object":"#<JSONModel(:accession)
{\"publish\"=>true, \"jsonmodel_type\"=>\"accession\",
\"external_ids\"=>[], \"related_accessions\"=>[], \"subjects\"=>[],
\"linked_events\"=>[], \"extents\"=>[], \"dates\"=>[],
\"external_documents\"=>[], \"rights_statements\"=>[],
\"deaccessions\"=>[], \"related_resources\"=>[],
\"restrictions_apply\"=>false, \"access_restrictions\"=>false,
\"use_restrictions\"=>false, \"linked_agents\"=>[], \"instances\"=>[]}>"}
Any idea?
Mang Sun
Rice U.
More information about the Archivesspace_Users_Group
mailing list