webapi confuses workpiece properties with process identifiers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Goobi.Production |
Triaged
|
Medium
|
Unassigned | ||
1.8 |
Triaged
|
Medium
|
Unassigned |
Bug Description
Requesting the Web API URL /processes delivers a confusing process description:
<goobiProcesses>
<goobiProcess>
<identifie
<title>
</goobiProcess>
<!-- ... -->
<goobiProcesses>
1- The "identifier" given here is really a property of the physical workpiece and NOT the process identifier.
2- The "title" element also states a property of the physical workpiece and NOT the process title.
This is confusing, as Goobi UI itself only tells about process title and its database identifier. A proper fix should clarify this by stating the correct fields in the XML (as well JSON) output:
<goobiProcesses>
<goobiProcess href="/
<id>
<title>
</goobiProcess>
<!-- more processes -->
<goobiProcesses>
While /process/<id> still refers to a specific process resource, the list resource /processes should be usable with additional query parameters for finding processes by workpiece value, e. g. /processes?
To be REST-ful the output should state a separate link to the related workpieces and physicalTemplates resources, additionally returning some of the workpiece properties as a shortcut in the full project description:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<goobiProcess>
<id>20854</id>
<title>
<physicalTemp
<physicalT
<property name="Titel" value="Disputatio, Materiam Testamentorvm breuiter complectens"/>
<!-- more common properties -->
</
</physicalTem
<workpieces href="/
<workpiece id="1">
<property name="PPN digital a-Satz" value="331024802"/>
<!-- more common properties -->
</workpieces>
</goobiProcess>