curl --request POST \
--url https://api.example.com/feedback/replace \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"weave_ref": "<string>",
"feedback_type": "<string>",
"payload": {},
"feedback_id": "<string>",
"id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"creator": "Jane Smith",
"annotation_ref": "weave:///entity/project/object/name:digest",
"runnable_ref": "weave:///entity/project/op/name:digest",
"call_ref": "weave:///entity/project/call/call_id",
"trigger_ref": "weave:///entity/project/object/name:digest",
"queue_id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"scorer_tags": [
"<string>"
],
"scorer_tag_reasons": {},
"scorer_tag_confidences": {},
"scorer_ratings": {},
"scorer_rating_reasons": {},
"scorer_rating_confidences": {},
"wb_user_id": "<string>"
}
'import requests
url = "https://api.example.com/feedback/replace"
payload = {
"project_id": "<string>",
"weave_ref": "<string>",
"feedback_type": "<string>",
"payload": {},
"feedback_id": "<string>",
"id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"creator": "Jane Smith",
"annotation_ref": "weave:///entity/project/object/name:digest",
"runnable_ref": "weave:///entity/project/op/name:digest",
"call_ref": "weave:///entity/project/call/call_id",
"trigger_ref": "weave:///entity/project/object/name:digest",
"queue_id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"scorer_tags": ["<string>"],
"scorer_tag_reasons": {},
"scorer_tag_confidences": {},
"scorer_ratings": {},
"scorer_rating_reasons": {},
"scorer_rating_confidences": {},
"wb_user_id": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: '<string>',
weave_ref: '<string>',
feedback_type: '<string>',
payload: {},
feedback_id: '<string>',
id: '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
creator: 'Jane Smith',
annotation_ref: 'weave:///entity/project/object/name:digest',
runnable_ref: 'weave:///entity/project/op/name:digest',
call_ref: 'weave:///entity/project/call/call_id',
trigger_ref: 'weave:///entity/project/object/name:digest',
queue_id: '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
scorer_tags: ['<string>'],
scorer_tag_reasons: {},
scorer_tag_confidences: {},
scorer_ratings: {},
scorer_rating_reasons: {},
scorer_rating_confidences: {},
wb_user_id: '<string>'
})
};
fetch('https://api.example.com/feedback/replace', 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.example.com/feedback/replace",
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([
'project_id' => '<string>',
'weave_ref' => '<string>',
'feedback_type' => '<string>',
'payload' => [
],
'feedback_id' => '<string>',
'id' => '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
'creator' => 'Jane Smith',
'annotation_ref' => 'weave:///entity/project/object/name:digest',
'runnable_ref' => 'weave:///entity/project/op/name:digest',
'call_ref' => 'weave:///entity/project/call/call_id',
'trigger_ref' => 'weave:///entity/project/object/name:digest',
'queue_id' => '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
'scorer_tags' => [
'<string>'
],
'scorer_tag_reasons' => [
],
'scorer_tag_confidences' => [
],
'scorer_ratings' => [
],
'scorer_rating_reasons' => [
],
'scorer_rating_confidences' => [
],
'wb_user_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.example.com/feedback/replace"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"feedback_id\": \"<string>\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"creator\": \"Jane Smith\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"scorer_tag_reasons\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_ratings\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_rating_confidences\": {},\n \"wb_user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.example.com/feedback/replace")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"feedback_id\": \"<string>\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"creator\": \"Jane Smith\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"scorer_tag_reasons\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_ratings\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_rating_confidences\": {},\n \"wb_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/replace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"feedback_id\": \"<string>\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"creator\": \"Jane Smith\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"scorer_tag_reasons\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_ratings\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_rating_confidences\": {},\n \"wb_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"wb_user_id": "<string>",
"payload": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Feedback Replace
curl --request POST \
--url https://api.example.com/feedback/replace \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"weave_ref": "<string>",
"feedback_type": "<string>",
"payload": {},
"feedback_id": "<string>",
"id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"creator": "Jane Smith",
"annotation_ref": "weave:///entity/project/object/name:digest",
"runnable_ref": "weave:///entity/project/op/name:digest",
"call_ref": "weave:///entity/project/call/call_id",
"trigger_ref": "weave:///entity/project/object/name:digest",
"queue_id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"scorer_tags": [
"<string>"
],
"scorer_tag_reasons": {},
"scorer_tag_confidences": {},
"scorer_ratings": {},
"scorer_rating_reasons": {},
"scorer_rating_confidences": {},
"wb_user_id": "<string>"
}
'import requests
url = "https://api.example.com/feedback/replace"
payload = {
"project_id": "<string>",
"weave_ref": "<string>",
"feedback_type": "<string>",
"payload": {},
"feedback_id": "<string>",
"id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"creator": "Jane Smith",
"annotation_ref": "weave:///entity/project/object/name:digest",
"runnable_ref": "weave:///entity/project/op/name:digest",
"call_ref": "weave:///entity/project/call/call_id",
"trigger_ref": "weave:///entity/project/object/name:digest",
"queue_id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"scorer_tags": ["<string>"],
"scorer_tag_reasons": {},
"scorer_tag_confidences": {},
"scorer_ratings": {},
"scorer_rating_reasons": {},
"scorer_rating_confidences": {},
"wb_user_id": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: '<string>',
weave_ref: '<string>',
feedback_type: '<string>',
payload: {},
feedback_id: '<string>',
id: '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
creator: 'Jane Smith',
annotation_ref: 'weave:///entity/project/object/name:digest',
runnable_ref: 'weave:///entity/project/op/name:digest',
call_ref: 'weave:///entity/project/call/call_id',
trigger_ref: 'weave:///entity/project/object/name:digest',
queue_id: '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
scorer_tags: ['<string>'],
scorer_tag_reasons: {},
scorer_tag_confidences: {},
scorer_ratings: {},
scorer_rating_reasons: {},
scorer_rating_confidences: {},
wb_user_id: '<string>'
})
};
fetch('https://api.example.com/feedback/replace', 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.example.com/feedback/replace",
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([
'project_id' => '<string>',
'weave_ref' => '<string>',
'feedback_type' => '<string>',
'payload' => [
],
'feedback_id' => '<string>',
'id' => '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
'creator' => 'Jane Smith',
'annotation_ref' => 'weave:///entity/project/object/name:digest',
'runnable_ref' => 'weave:///entity/project/op/name:digest',
'call_ref' => 'weave:///entity/project/call/call_id',
'trigger_ref' => 'weave:///entity/project/object/name:digest',
'queue_id' => '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
'scorer_tags' => [
'<string>'
],
'scorer_tag_reasons' => [
],
'scorer_tag_confidences' => [
],
'scorer_ratings' => [
],
'scorer_rating_reasons' => [
],
'scorer_rating_confidences' => [
],
'wb_user_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.example.com/feedback/replace"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"feedback_id\": \"<string>\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"creator\": \"Jane Smith\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"scorer_tag_reasons\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_ratings\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_rating_confidences\": {},\n \"wb_user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.example.com/feedback/replace")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"feedback_id\": \"<string>\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"creator\": \"Jane Smith\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"scorer_tag_reasons\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_ratings\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_rating_confidences\": {},\n \"wb_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/replace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"feedback_id\": \"<string>\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"creator\": \"Jane Smith\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"scorer_tag_reasons\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_ratings\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_rating_confidences\": {},\n \"wb_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"wb_user_id": "<string>",
"payload": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
"entity/project"
"weave:///entity/project/object/name:digest"
"custom"
{ "key": "value" }If provided by the client, this ID will be used for the feedback row instead of a server-generated one.
"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b"
"Jane Smith"
"weave:///entity/project/object/name:digest"
"weave:///entity/project/op/name:digest"
"weave:///entity/project/call/call_id"
"weave:///entity/project/object/name:digest"
The annotation queue ID this feedback was created from. References annotation_queues.id. NULL when feedback is created outside of queues.
"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b"
Tags applied to the ref by a scorer
["nsfw", "high-quality"]reason text per tag, keyed by tag name
Show child attributes
Show child attributes
{ "nsfw": "Contains explicit language" }confidence (0-1) per tag, keyed by tag name
Show child attributes
Show child attributes
{ "nsfw": 0.92 }numeric ratings (0-1) keyed by rating name
Show child attributes
Show child attributes
{ "_rating_": 0.87 }reason text per rating, keyed by rating name
Show child attributes
Show child attributes
{ "_rating_": "very confident response" }confidence (0-1) per rating, keyed by rating name
Show child attributes
Show child attributes
{ "_rating_": 0.92 }Do not set directly. Server will automatically populate this field.
Was this page helpful?