annotations
Create annotations reuse
Requires scopes: eval:write
POST
/
api
/
annotations
/
tasks
/
{id}
/
items
/
{itemId}
/
reuse
Create annotations reuse
curl --request POST \
--url https://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluationId": 123,
"rationale": "<string>",
"label": "pass",
"failureMode": "<string>",
"sourceVersion": "reviewed",
"deferred": false,
"expectedOutputEdit": "<string>"
}
'import requests
url = "https://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse"
payload = {
"evaluationId": 123,
"rationale": "<string>",
"label": "pass",
"failureMode": "<string>",
"sourceVersion": "reviewed",
"deferred": False,
"expectedOutputEdit": "<string>"
}
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({
evaluationId: 123,
rationale: '<string>',
label: 'pass',
failureMode: '<string>',
sourceVersion: 'reviewed',
deferred: false,
expectedOutputEdit: '<string>'
})
};
fetch('https://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse', 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://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse",
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([
'evaluationId' => 123,
'rationale' => '<string>',
'label' => 'pass',
'failureMode' => '<string>',
'sourceVersion' => 'reviewed',
'deferred' => false,
'expectedOutputEdit' => '<string>'
]),
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://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse"
payload := strings.NewReader("{\n \"evaluationId\": 123,\n \"rationale\": \"<string>\",\n \"label\": \"pass\",\n \"failureMode\": \"<string>\",\n \"sourceVersion\": \"reviewed\",\n \"deferred\": false,\n \"expectedOutputEdit\": \"<string>\"\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://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"evaluationId\": 123,\n \"rationale\": \"<string>\",\n \"label\": \"pass\",\n \"failureMode\": \"<string>\",\n \"sourceVersion\": \"reviewed\",\n \"deferred\": false,\n \"expectedOutputEdit\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse")
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 \"evaluationId\": 123,\n \"rationale\": \"<string>\",\n \"label\": \"pass\",\n \"failureMode\": \"<string>\",\n \"sourceVersion\": \"reviewed\",\n \"deferred\": false,\n \"expectedOutputEdit\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"labeledCase": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluationId": 123,
"label": "<string>",
"source": "<string>",
"metadata": {},
"trajectory": {},
"input": "<string>",
"expectedOutput": "<string>",
"failureMode": "<string>",
"promptId": "<string>",
"actualOutput": "<string>",
"labeledByUserId": "<string>",
"labeledAt": "2023-11-07T05:31:56Z",
"externalRunId": "<string>",
"sourceTraceId": "<string>",
"sourceContentHash": "<string>",
"clusterId": "<string>",
"clusterFingerprint": "<string>",
"riskLayer": "<string>",
"standardsRefs": [
"<string>"
],
"synthesis": {}
},
"sourceIdentity": {
"kind": "unknown",
"sourceMode": "manual",
"creationMethod": "human_review",
"annotationTaskId": 123,
"annotationItemId": 123,
"subjectKind": "<string>",
"evaluationId": 123,
"evaluationRunId": 123,
"testResultId": 123,
"testCaseId": 123,
"logicalTrialIndex": 123,
"physicalAttemptIndex": 123,
"attemptId": "<string>",
"recordedStatus": "<string>",
"contentHash": "<string>",
"limitation": "<string>"
},
"copied": {
"input": true,
"expectedOutput": true,
"actualOutput": true
},
"linked": true,
"nextStep": "<string>"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}Authorizations
Organization-scoped EvalGate API key. Discover the supported agent scopes at /.well-known/oauth-protected-resource. Per-operation grants are listed in x-evalgate-required-scopes; OpenAPI bearer security requirement arrays remain empty as required for non-OAuth schemes.
Body
application/json
Available options:
pass Available options:
reviewed Available options:
false ⌘I
Create annotations reuse
curl --request POST \
--url https://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluationId": 123,
"rationale": "<string>",
"label": "pass",
"failureMode": "<string>",
"sourceVersion": "reviewed",
"deferred": false,
"expectedOutputEdit": "<string>"
}
'import requests
url = "https://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse"
payload = {
"evaluationId": 123,
"rationale": "<string>",
"label": "pass",
"failureMode": "<string>",
"sourceVersion": "reviewed",
"deferred": False,
"expectedOutputEdit": "<string>"
}
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({
evaluationId: 123,
rationale: '<string>',
label: 'pass',
failureMode: '<string>',
sourceVersion: 'reviewed',
deferred: false,
expectedOutputEdit: '<string>'
})
};
fetch('https://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse', 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://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse",
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([
'evaluationId' => 123,
'rationale' => '<string>',
'label' => 'pass',
'failureMode' => '<string>',
'sourceVersion' => 'reviewed',
'deferred' => false,
'expectedOutputEdit' => '<string>'
]),
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://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse"
payload := strings.NewReader("{\n \"evaluationId\": 123,\n \"rationale\": \"<string>\",\n \"label\": \"pass\",\n \"failureMode\": \"<string>\",\n \"sourceVersion\": \"reviewed\",\n \"deferred\": false,\n \"expectedOutputEdit\": \"<string>\"\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://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"evaluationId\": 123,\n \"rationale\": \"<string>\",\n \"label\": \"pass\",\n \"failureMode\": \"<string>\",\n \"sourceVersion\": \"reviewed\",\n \"deferred\": false,\n \"expectedOutputEdit\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://evalgate.com/api/annotations/tasks/{id}/items/{itemId}/reuse")
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 \"evaluationId\": 123,\n \"rationale\": \"<string>\",\n \"label\": \"pass\",\n \"failureMode\": \"<string>\",\n \"sourceVersion\": \"reviewed\",\n \"deferred\": false,\n \"expectedOutputEdit\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"labeledCase": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluationId": 123,
"label": "<string>",
"source": "<string>",
"metadata": {},
"trajectory": {},
"input": "<string>",
"expectedOutput": "<string>",
"failureMode": "<string>",
"promptId": "<string>",
"actualOutput": "<string>",
"labeledByUserId": "<string>",
"labeledAt": "2023-11-07T05:31:56Z",
"externalRunId": "<string>",
"sourceTraceId": "<string>",
"sourceContentHash": "<string>",
"clusterId": "<string>",
"clusterFingerprint": "<string>",
"riskLayer": "<string>",
"standardsRefs": [
"<string>"
],
"synthesis": {}
},
"sourceIdentity": {
"kind": "unknown",
"sourceMode": "manual",
"creationMethod": "human_review",
"annotationTaskId": 123,
"annotationItemId": 123,
"subjectKind": "<string>",
"evaluationId": 123,
"evaluationRunId": 123,
"testResultId": 123,
"testCaseId": 123,
"logicalTrialIndex": 123,
"physicalAttemptIndex": 123,
"attemptId": "<string>",
"recordedStatus": "<string>",
"contentHash": "<string>",
"limitation": "<string>"
},
"copied": {
"input": true,
"expectedOutput": true,
"actualOutput": true
},
"linked": true,
"nextStep": "<string>"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redaction": {
"applied": true,
"fieldCount": 1,
"secretCount": 1
}
}
}