# Computes feedback for an existing task. This endpoint works for tasks that have already been registered. Endpoint: POST /tasks/${taskId}/feedback/compute Version: 0.9.0 Security: BearerAuthentication ## Path parameters: - `taskId` (string, required) The ID of the task. ## Request fields (application/json): - `userId` (string, required) By setting this field, you will link the answer to the provided learner identifier. Alternatively, you can use an anonymous identifier if preferred. Example: "some_anonymous_id" - `tenantId` (string) The identifier of the tenant where the target task, specified in the taskDefinition, will be stored or searched for. If not provided the domain's default tenant will be used. Ensure that the API user has the necessary permissions on the target tenant to create or update a task. If not, an [error-response](http://localhost:60000/documentation#tag/error_response_model) of type will be returned. Example: "product_123" - `metaData` (object) The object containing metadata related to the learner interaction. - `metaData.timeOnTask` (integer) The time in seconds it takes the user to answer the task. While this field is not mandatory, it may eventually impact the learner's task recommendations. Hence, it is recommended to set and track this field. Example: 64 - `metaData.tryCount` (integer) The number of attempts the learner has made, including the current request. This can be useful if the userId is not unique for privacy reasons or if not every attempt is sent via the API. Otherwise, the attempt count can be inferred from the number of API calls and is typically left empty. Example: 3 - `metaData.sessionId` (string) An optional identifier to group multiple interactions into one session. Useful for statistical purposes. - `taskType` (string, required) Defines the type of the task. Can be used by deserialization tools to instantiate the correct sub-type. Enum: "FREEFORM_TEXT", "IN_TEXT_FILL_IN_BLANKS", "IN_TEXT_CHOICES", "MULTIPLE_CHOICE", "MULTIPLE_RESPONSES" ## Response 200 fields (application/json): - `userId` (string, required) The user ID this feedback is meant for. Example: "some_anonymous_id" - `taskId` (string, required) The task ID this feedback is meant for. Example: "0Ihkl0CyzoWSjDm5F" - `taskType` (string, required) Defines the type of the task. Can be used by deserialization tools to instantiate the correct sub-type. Enum: "FREEFORM_TEXT", "IN_TEXT_FILL_IN_BLANKS", "IN_TEXT_CHOICES", "MULTIPLE_CHOICE", "MULTIPLE_RESPONSES" - `metaData` (object, required) The object containing metadata about the performed operation, along with helpful debugging information. Designed to simplify the integration process and does not include any production-related details that should be visible to the end user. - `metaData.taskAction` (string, required) The action that was performed on the task. Enum: "CREATED", "UPDATED", "UNCHANGED" - `metaData.tenantId` (string, required) - `metaData.taskLink` (string, required) Deeplink to task in the Taskbase Cockpit. ## Response 400 fields (application/json): - `message` (string, required) Contains more detailed information about the root cause of the problem. Example: "The user associated with the provided bearer token is not authorized." - `type` (string, required) Possible errors the API may return. For more details, refer to the [error table](#section/Error-Types). Enum: "REQUEST_SCHEMA_MALFORMED", "INVALID_TOKEN", "MISSING_PERMISSIONS", "INVALID_PARAMETER", "WRONG_TASK_TYPE_FOR_UPSERT", "INTERNAL" ## Response 500 fields (application/json): - `message` (string, required) Contains more detailed information about the root cause of the problem. Example: "An error occurred while processing your request. It has been logged with the ID 2b6b2818cc22fc4b." - `type` (string, required) Possible errors the API may return. For more details, refer to the [error table](#section/Error-Types). Enum: "REQUEST_SCHEMA_MALFORMED", "INVALID_TOKEN", "MISSING_PERMISSIONS", "INVALID_PARAMETER", "WRONG_TASK_TYPE_FOR_UPSERT", "INTERNAL"