Mit POST /api/process/{processid}/metadata
lassen sich sehr schön Metadaten zu einem Vorgang mittels der REST-API in Workflow ergänzen.
Das Example-Schema für das übergebene Datenobjekt zeigt einen Key authorityValue
an, leider habe ich bislang noch nicht herausgefunden, wie ich da bspw. einen GND-Identifier dem Metadatum übergebe. Der einfache Identifier wird nicht übernommen, auch nicht die URI.
{
"name": "string",
"value": "string",
"metadataLevel": "string",
"authorityValue": "string",
"firstname": "string",
"lastname": "string"
}
Freu mich über Info dazu! 
Hallo,
so etwas sollte funktionieren:
{"name": "Author", "authorityValue": "https://d-nb.info/gnd/123456", "firstName": "John", "lastName": "Doe"}
Viele Grüße
Robert
2 „Gefällt mir“
Danke für den Hinweis. Das klappt so aber leider noch nicht ganz.
-
Ohne key "value" :"John Doe"
im MetadataObject wird gar kein Eintrag geschrieben. (Es kommt zwar von der API die Erfolgsmeldung “metadata added”; aber es findet sich nichts in den Metadaten.
-
Im Metadaten-Editor wird der GND-Eintrag nicht angezeigt; der erwartet scheinbar dass der Normdateneintrag gesplittet ist in mods:authorityValue (“123456”), mods:authorityID (“gnd”), mods:authorityURL (“https://d-nb…”); mit dem API-Call wird der URI in mods:authorityValue gesetzt und mehr nicht.
-
Des weiteren scheint das nur für Typ-Personendaten zu funktionieren; “flache” Metadaten wir SubjectGeographic mit GND-ID einzutragen klappt erst gar nicht; da wird nur der Value geschrieben.
LG
Christian
To add to this thread – is it possible to retrieve and potentially add or update metadata on child structures? The POST & PUT calls are supposed to specify the “metadatalevel” but the GET request only returns the “topstruct” level data, so I’m not sure how I would key that.
GET:
[
{
"name": "PublicationYear",
"value": "1849",
"metadataLevel": "topstruct"
},...
]
POST & PUT
{
"name": "string",
"value": "string",
"metadataLevel": "string",
"authorityValue": "string",
"firstname": "string",
"lastname": "string"
}
Is it possible, for instance, for us to fetch child structures, change the data, and PUT the alterations up?
unfortunately i haven’t tested the REST-API with any child structures. comparing with the GoobiScript functiuonality of dealing with child structures, i fear it won’t be possible, maybe only that way, that you could add or remove equal metadata for all child structures in a process. to edit child structures it could be necessary to address a certain child element, identified by its dmdid. for such purposes i am dealing script based directly with the xml file.