curl --request POST \
  --url https://api-prod.extend.app/v1/evaluation_set_items/:id \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "expectedOutput": {}
}'
{
  "success": true,
  "evaluationSetItem": {
    "object": "evaluation_set_item",
    "id": "eval_item_1234",
    "evaluationSetId": "eval_set_1234",
    "fileId": "file_1234",
    "expectedOutput": {
      "field1": {
        "id": "field_fsdf",
        "type": "string",
        "value": "Updated field output"
      },
      "field2": {
        "id": "field_1234",
        "type": "number",
        "value": 1234
      }
    },
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z"
  }
}

If you need to change the expected output for a given evaluation set item, you can use this endpoint to update the item. This can be useful if you need to correct an error in the expected output or if the output of the processor has changed.

Parameters

id
string

The ID of the evaluation set item to update.

Body

expectedOutput
object
required

The expected output of the processor when run against the file.

This should be a JSON object conforming to the output type schema of the processor.

Response

success
boolean

A true or false value for whether the evaluation set item was created successfully or not.

evaluationSetItem
EvaluationSetItem

An EvaluationSetItem object representing the newly created evaluation set item. See the EvaluationSetItem object for more details.

{
  "success": true,
  "evaluationSetItem": {
    "object": "evaluation_set_item",
    "id": "eval_item_1234",
    "evaluationSetId": "eval_set_1234",
    "fileId": "file_1234",
    "expectedOutput": {
      "field1": {
        "id": "field_fsdf",
        "type": "string",
        "value": "Updated field output"
      },
      "field2": {
        "id": "field_1234",
        "type": "number",
        "value": 1234
      }
    },
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z"
  }
}