Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
hiddentrue
idrLANGDONE

Product Version
Report Note
Assignee

Resources & Remarks


Modification History

NameDateProduct VersionAction
Antje15 JUL 20212021 Autumncreated
Antje25 NOV 20222022 Winterupdate endpoint url



As of Versionproduct version 2021 Autumn | component version 0.32022 Winter
Request MethodPOST
Response FormatHTTP status code
Description



Excerpt

Sends a feedback to the AI engine ML Pipeline informing about the user decision for a suggested object typeone of the object types suggested in a prediction.


After the classification is done and the predicted document types are shown to the user, the user decides which one is the actual correct type and store stores it. It is important to send the chosen document type back to the AI engine inform the ML Pipeline about this decision in order to improve future predictions by calling this feedback endpoint.

In the JSON request body, the following parameters are expected:

  • predictionId - id  – ID returned back by the AI engine when document classification is requestedobjectTypeId - objectTypeId user chose for the documentclassification retrieval endpoints.
  • feedbackData.objectTypeId.value – ID of the object type selected by the user.

Meaning of HTTP status codes:

HTTP Status CodeDescription
200 OKOK
400 Bad RequestRequest is bad.
404 Not Found
Schema is not defined for these parameters. (question)
Specified predictionId was not found.
500 Internal Server ErrorError while
getting status information
storing feedback.

If an error is thrown, it will be a JSON structure is returned as response body.

Request Header

Content-Type: application/json

X-ID-TENANT-NAME: tenant_name

Request Example
/predict-api/api/classification/feedback
Code Block
languageyml
titlerequest body
{
   "properties": {
      "predictionId": {
          "value":473       
      },
      "feedbackData":{
          "objectTypeId": {
              "value": "Rechnung"          
          }
      }
   }
}

Result Example

(1) Successful

200 OK

(2) Not succelful:

400 Not FoundBad Request

Code Block
languageymltitleresponse body
{
    "statusCode": 400,
    "timestamp": "2020-12-25T09:42:33.386+00:00",
    "message": "JSON parse error: Unrecognized field \"objectTyyyyypeId\" (class com.os.ai.predict.domain.classification.ClassificationFeedbackRequestData), not marked as ignorable..."
}


...