Update Evaluation Set Item
curl --request POST \
--url https://api-prod.extend.app/evaluation_set_items/:id \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedOutput": {}
}
'import requests
url = "https://api-prod.extend.app/evaluation_set_items/:id"
payload = { "expectedOutput": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expectedOutput: {}})
};
fetch('https://api-prod.extend.app/evaluation_set_items/:id', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-prod.extend.app/evaluation_set_items/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expectedOutput' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-prod.extend.app/evaluation_set_items/:id"
payload := strings.NewReader("{\n \"expectedOutput\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-prod.extend.app/evaluation_set_items/:id")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedOutput\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.extend.app/evaluation_set_items/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expectedOutput\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"evaluationSetItem": {
"object": "evaluation_set_item",
"id": "eval_item_1234",
"evaluationSetId": "eval_set_1234",
"fileId": "file_1234",
"expectedOutput": {
// Output object - see “Processor output types” for details
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
}
Evaluation Set Endpoints
Update Evaluation Set Item
Update an evaluation set item by ID.
Update Evaluation Set Item
curl --request POST \
--url https://api-prod.extend.app/evaluation_set_items/:id \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedOutput": {}
}
'import requests
url = "https://api-prod.extend.app/evaluation_set_items/:id"
payload = { "expectedOutput": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expectedOutput: {}})
};
fetch('https://api-prod.extend.app/evaluation_set_items/:id', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-prod.extend.app/evaluation_set_items/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expectedOutput' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-prod.extend.app/evaluation_set_items/:id"
payload := strings.NewReader("{\n \"expectedOutput\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-prod.extend.app/evaluation_set_items/:id")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedOutput\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.extend.app/evaluation_set_items/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expectedOutput\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"evaluationSetItem": {
"object": "evaluation_set_item",
"id": "eval_item_1234",
"evaluationSetId": "eval_set_1234",
"fileId": "file_1234",
"expectedOutput": {
// Output object - see “Processor output types” for details
},
"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
string
The ID of the evaluation set item to update.
Body
object
default:"{ hi: 'hi' }"
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
boolean
A true or false value for whether the evaluation set item was created
successfully or not.
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": {
// Output object - see “Processor output types” for details
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
}

