curl --request POST \
--url https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"expectedOutcome": "EVALUATION_RESULT_UNSPECIFIED",
"target": {
"contentHash": "<string>"
},
"label": "<string>",
"comment": "<string>"
}
]
}
'import requests
url = "https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback"
payload = { "items": [
{
"expectedOutcome": "EVALUATION_RESULT_UNSPECIFIED",
"target": { "contentHash": "<string>" },
"label": "<string>",
"comment": "<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({
items: [
{
expectedOutcome: 'EVALUATION_RESULT_UNSPECIFIED',
target: {contentHash: '<string>'},
label: '<string>',
comment: '<string>'
}
]
})
};
fetch('https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8443",
CURLOPT_URL => "https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback",
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([
'items' => [
[
'expectedOutcome' => 'EVALUATION_RESULT_UNSPECIFIED',
'target' => [
'contentHash' => '<string>'
],
'label' => '<string>',
'comment' => '<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://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback"
payload := strings.NewReader("{\n \"items\": [\n {\n \"expectedOutcome\": \"EVALUATION_RESULT_UNSPECIFIED\",\n \"target\": {\n \"contentHash\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"comment\": \"<string>\"\n }\n ]\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://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"expectedOutcome\": \"EVALUATION_RESULT_UNSPECIFIED\",\n \"target\": {\n \"contentHash\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"comment\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback")
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 \"items\": [\n {\n \"expectedOutcome\": \"EVALUATION_RESULT_UNSPECIFIED\",\n \"target\": {\n \"contentHash\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"comment\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"annotations": [
{
"id": "<string>",
"jobUuid": "<string>",
"jobResultId": "<string>",
"target": {
"contentHash": "<string>",
"occurrence": {
"modality": "MODALITY_UNSPECIFIED",
"startMs": "<string>",
"endMs": "<string>"
}
},
"label": "<string>",
"labelId": "<string>",
"labelVersionId": "<string>",
"expectedOutcome": "EVALUATION_RESULT_UNSPECIFIED",
"actualOutcome": "EVALUATION_RESULT_UNSPECIFIED",
"comment": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"type": "PRECHECK_FAILURE_TYPE_UNSPECIFIED",
"message": "<string>",
"details": "<unknown>",
"matchConfidence": "PRECHECK_MATCH_CONFIDENCE_UNSPECIFIED"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Submit job feedback
Records feedback about the outcome a label produced for a piece of content, or a specific video frame or transcript chunk, in a completed job. Copy GetJobLabels LabelHit fields into the item’s target.occurrence to address a video occurrence, or omit occurrence to address the whole result. Feedback is stored one entry per (content or video occurrence, label) pair; submitting feedback for a pair that already has feedback replaces it. actual_outcome is the thresholded section or label result, not a per-frame occurrence score. Available to policy-first and label-first accounts; works on any job in the account, including jobs from POST /v1/labels/evaluate.
curl --request POST \
--url https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"expectedOutcome": "EVALUATION_RESULT_UNSPECIFIED",
"target": {
"contentHash": "<string>"
},
"label": "<string>",
"comment": "<string>"
}
]
}
'import requests
url = "https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback"
payload = { "items": [
{
"expectedOutcome": "EVALUATION_RESULT_UNSPECIFIED",
"target": { "contentHash": "<string>" },
"label": "<string>",
"comment": "<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({
items: [
{
expectedOutcome: 'EVALUATION_RESULT_UNSPECIFIED',
target: {contentHash: '<string>'},
label: '<string>',
comment: '<string>'
}
]
})
};
fetch('https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8443",
CURLOPT_URL => "https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback",
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([
'items' => [
[
'expectedOutcome' => 'EVALUATION_RESULT_UNSPECIFIED',
'target' => [
'contentHash' => '<string>'
],
'label' => '<string>',
'comment' => '<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://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback"
payload := strings.NewReader("{\n \"items\": [\n {\n \"expectedOutcome\": \"EVALUATION_RESULT_UNSPECIFIED\",\n \"target\": {\n \"contentHash\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"comment\": \"<string>\"\n }\n ]\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://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"expectedOutcome\": \"EVALUATION_RESULT_UNSPECIFIED\",\n \"target\": {\n \"contentHash\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"comment\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.app.clavata.ai:8443/v1/jobs/{jobUuid}/feedback")
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 \"items\": [\n {\n \"expectedOutcome\": \"EVALUATION_RESULT_UNSPECIFIED\",\n \"target\": {\n \"contentHash\": \"<string>\"\n },\n \"label\": \"<string>\",\n \"comment\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"annotations": [
{
"id": "<string>",
"jobUuid": "<string>",
"jobResultId": "<string>",
"target": {
"contentHash": "<string>",
"occurrence": {
"modality": "MODALITY_UNSPECIFIED",
"startMs": "<string>",
"endMs": "<string>"
}
},
"label": "<string>",
"labelId": "<string>",
"labelVersionId": "<string>",
"expectedOutcome": "EVALUATION_RESULT_UNSPECIFIED",
"actualOutcome": "EVALUATION_RESULT_UNSPECIFIED",
"comment": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"type": "PRECHECK_FAILURE_TYPE_UNSPECIFIED",
"message": "<string>",
"details": "<unknown>",
"matchConfidence": "PRECHECK_MATCH_CONFIDENCE_UNSPECIFIED"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
job_uuid is the unique identifier of the job the feedback is about
Body
The feedback to record. At least one and at most 100 entries. Two entries resolving to the same content or video occurrence and label are rejected.
Show child attributes
Show child attributes
Response
A successful response.
Show child attributes
Show child attributes
Was this page helpful?