webapi confuses workpiece properties with process identifiers

Bug #1033580 reported by Ralf Claussnitzer
6
This bug affects 1 person
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>
     <identifier>331024802</identifier>
     <title>Disputatio, Materiam Testamentorvm breuiter complectens</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="/processes/20854">
     <id>20854</identifier>
     <title>testbco_331024802</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?workpiece.name="PPN digital a-Satz"&workpiece.value="331024802".

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>testbco_331024802</title>
  <physicalTemplates href="/process/20854/physicalTemplates">
     <physicalTemplate id="1">
       <property name="Titel" value="Disputatio, Materiam Testamentorvm breuiter complectens"/>
       <!-- more common properties -->
     </physicalTemplate>
  </physicalTemplates>
  <workpieces href="/processes/20854/workpieces">
    <workpiece id="1">
       <property name="PPN digital a-Satz" value="331024802"/>
       <!-- more common properties -->
  </workpieces>
</goobiProcess>

Tags: webapi
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.