Apply Bulk Feedback V2
curl --request POST \
--url https://api.galileo.ai/v2/projects/{project_id}/feedback/ratings \
--header 'Content-Type: application/json' \
--header 'Splunk-AO-API-Key: <api-key>' \
--data '
{
"operations": [
{
"rating": {
"value": true,
"feedback_type": "like_dislike"
},
"feedback_template_id": "<string>",
"explanation": "<string>",
"operation_type": "create"
}
],
"selector": {
"indexes": [
123
],
"selector_type": "indexes"
}
}
'import requests
url = "https://api.galileo.ai/v2/projects/{project_id}/feedback/ratings"
payload = {
"operations": [
{
"rating": {
"value": True,
"feedback_type": "like_dislike"
},
"feedback_template_id": "<string>",
"explanation": "<string>",
"operation_type": "create"
}
],
"selector": {
"indexes": [123],
"selector_type": "indexes"
}
}
headers = {
"Splunk-AO-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Splunk-AO-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operations: [
{
rating: {value: true, feedback_type: 'like_dislike'},
feedback_template_id: '<string>',
explanation: '<string>',
operation_type: 'create'
}
],
selector: {indexes: [123], selector_type: 'indexes'}
})
};
fetch('https://api.galileo.ai/v2/projects/{project_id}/feedback/ratings', 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.galileo.ai/v2/projects/{project_id}/feedback/ratings",
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([
'operations' => [
[
'rating' => [
'value' => true,
'feedback_type' => 'like_dislike'
],
'feedback_template_id' => '<string>',
'explanation' => '<string>',
'operation_type' => 'create'
]
],
'selector' => [
'indexes' => [
123
],
'selector_type' => 'indexes'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Splunk-AO-API-Key: <api-key>"
],
]);
$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.galileo.ai/v2/projects/{project_id}/feedback/ratings"
payload := strings.NewReader("{\n \"operations\": [\n {\n \"rating\": {\n \"value\": true,\n \"feedback_type\": \"like_dislike\"\n },\n \"feedback_template_id\": \"<string>\",\n \"explanation\": \"<string>\",\n \"operation_type\": \"create\"\n }\n ],\n \"selector\": {\n \"indexes\": [\n 123\n ],\n \"selector_type\": \"indexes\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Splunk-AO-API-Key", "<api-key>")
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.galileo.ai/v2/projects/{project_id}/feedback/ratings")
.header("Splunk-AO-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"operations\": [\n {\n \"rating\": {\n \"value\": true,\n \"feedback_type\": \"like_dislike\"\n },\n \"feedback_template_id\": \"<string>\",\n \"explanation\": \"<string>\",\n \"operation_type\": \"create\"\n }\n ],\n \"selector\": {\n \"indexes\": [\n 123\n ],\n \"selector_type\": \"indexes\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/projects/{project_id}/feedback/ratings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Splunk-AO-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"operations\": [\n {\n \"rating\": {\n \"value\": true,\n \"feedback_type\": \"like_dislike\"\n },\n \"feedback_template_id\": \"<string>\",\n \"explanation\": \"<string>\",\n \"operation_type\": \"create\"\n }\n ],\n \"selector\": {\n \"indexes\": [\n 123\n ],\n \"selector_type\": \"indexes\"\n }\n}"
response = http.request(request)
puts response.read_body[
{
"success": true,
"message": "<string>",
"selector": "indexes",
"index": 123,
"trace": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}feedback
Apply Bulk Feedback V2
deprecated
POST
/
v2
/
projects
/
{project_id}
/
feedback
/
ratings
Apply Bulk Feedback V2
curl --request POST \
--url https://api.galileo.ai/v2/projects/{project_id}/feedback/ratings \
--header 'Content-Type: application/json' \
--header 'Splunk-AO-API-Key: <api-key>' \
--data '
{
"operations": [
{
"rating": {
"value": true,
"feedback_type": "like_dislike"
},
"feedback_template_id": "<string>",
"explanation": "<string>",
"operation_type": "create"
}
],
"selector": {
"indexes": [
123
],
"selector_type": "indexes"
}
}
'import requests
url = "https://api.galileo.ai/v2/projects/{project_id}/feedback/ratings"
payload = {
"operations": [
{
"rating": {
"value": True,
"feedback_type": "like_dislike"
},
"feedback_template_id": "<string>",
"explanation": "<string>",
"operation_type": "create"
}
],
"selector": {
"indexes": [123],
"selector_type": "indexes"
}
}
headers = {
"Splunk-AO-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Splunk-AO-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operations: [
{
rating: {value: true, feedback_type: 'like_dislike'},
feedback_template_id: '<string>',
explanation: '<string>',
operation_type: 'create'
}
],
selector: {indexes: [123], selector_type: 'indexes'}
})
};
fetch('https://api.galileo.ai/v2/projects/{project_id}/feedback/ratings', 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.galileo.ai/v2/projects/{project_id}/feedback/ratings",
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([
'operations' => [
[
'rating' => [
'value' => true,
'feedback_type' => 'like_dislike'
],
'feedback_template_id' => '<string>',
'explanation' => '<string>',
'operation_type' => 'create'
]
],
'selector' => [
'indexes' => [
123
],
'selector_type' => 'indexes'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Splunk-AO-API-Key: <api-key>"
],
]);
$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.galileo.ai/v2/projects/{project_id}/feedback/ratings"
payload := strings.NewReader("{\n \"operations\": [\n {\n \"rating\": {\n \"value\": true,\n \"feedback_type\": \"like_dislike\"\n },\n \"feedback_template_id\": \"<string>\",\n \"explanation\": \"<string>\",\n \"operation_type\": \"create\"\n }\n ],\n \"selector\": {\n \"indexes\": [\n 123\n ],\n \"selector_type\": \"indexes\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Splunk-AO-API-Key", "<api-key>")
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.galileo.ai/v2/projects/{project_id}/feedback/ratings")
.header("Splunk-AO-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"operations\": [\n {\n \"rating\": {\n \"value\": true,\n \"feedback_type\": \"like_dislike\"\n },\n \"feedback_template_id\": \"<string>\",\n \"explanation\": \"<string>\",\n \"operation_type\": \"create\"\n }\n ],\n \"selector\": {\n \"indexes\": [\n 123\n ],\n \"selector_type\": \"indexes\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/projects/{project_id}/feedback/ratings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Splunk-AO-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"operations\": [\n {\n \"rating\": {\n \"value\": true,\n \"feedback_type\": \"like_dislike\"\n },\n \"feedback_template_id\": \"<string>\",\n \"explanation\": \"<string>\",\n \"operation_type\": \"create\"\n }\n ],\n \"selector\": {\n \"indexes\": [\n 123\n ],\n \"selector_type\": \"indexes\"\n }\n}"
response = http.request(request)
puts response.read_body[
{
"success": true,
"message": "<string>",
"selector": "indexes",
"index": 123,
"trace": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
APIKeyHeaderOAuth2PasswordBearerHTTPBasic
Path Parameters
Body
application/json
- BulkFeedbackRatingCreate
- BulkFeedbackRatingDelete
Show child attributes
Show child attributes
Choose specific indexes to apply the bulk operation to.
- IndexSelector
- TraceSelector
Show child attributes
Show child attributes
Response
Successful Response
Was this page helpful?
⌘I