Finish Experiment Api
curl --request POST \
--url https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished \
--header 'Content-Type: application/json' \
--header 'x-user-id: <api-key>' \
--data '
{
"dataset_level_stats": [
{
"name": "pearson_correlation",
"score": 0.8
}
],
"status": "completed"
}
'import requests
url = "https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished"
payload = {
"dataset_level_stats": [
{
"name": "pearson_correlation",
"score": 0.8
}
],
"status": "completed"
}
headers = {
"x-user-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-user-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset_level_stats: [{name: 'pearson_correlation', score: 0.8}],
status: 'completed'
})
};
fetch('https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished', 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://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished",
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([
'dataset_level_stats' => [
[
'name' => 'pearson_correlation',
'score' => 0.8
]
],
'status' => 'completed'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-user-id: <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://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished"
payload := strings.NewReader("{\n \"dataset_level_stats\": [\n {\n \"name\": \"pearson_correlation\",\n \"score\": 0.8\n }\n ],\n \"status\": \"completed\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-user-id", "<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://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished")
.header("x-user-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_level_stats\": [\n {\n \"name\": \"pearson_correlation\",\n \"score\": 0.8\n }\n ],\n \"status\": \"completed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-user-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_level_stats\": [\n {\n \"name\": \"pearson_correlation\",\n \"score\": 0.8\n }\n ],\n \"status\": \"completed\"\n}"
response = http.request(request)
puts response.read_body{
"parent_trace_stats": [
{
"trace_id": "<string>",
"latency": 0,
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"cost": 123,
"scores": [
{
"name": "<string>",
"score": 123,
"evaluation_metric_id": 123,
"reason": "<string>"
}
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Experiments
Finish Experiment
Finishes an experiment, calculates stats and returns all stats for root trace logs
POST
/
api
/
parea
/
v1
/
experiment
/
{experiment_uuid}
/
finished
Finish Experiment Api
curl --request POST \
--url https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished \
--header 'Content-Type: application/json' \
--header 'x-user-id: <api-key>' \
--data '
{
"dataset_level_stats": [
{
"name": "pearson_correlation",
"score": 0.8
}
],
"status": "completed"
}
'import requests
url = "https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished"
payload = {
"dataset_level_stats": [
{
"name": "pearson_correlation",
"score": 0.8
}
],
"status": "completed"
}
headers = {
"x-user-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-user-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset_level_stats: [{name: 'pearson_correlation', score: 0.8}],
status: 'completed'
})
};
fetch('https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished', 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://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished",
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([
'dataset_level_stats' => [
[
'name' => 'pearson_correlation',
'score' => 0.8
]
],
'status' => 'completed'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-user-id: <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://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished"
payload := strings.NewReader("{\n \"dataset_level_stats\": [\n {\n \"name\": \"pearson_correlation\",\n \"score\": 0.8\n }\n ],\n \"status\": \"completed\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-user-id", "<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://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished")
.header("x-user-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_level_stats\": [\n {\n \"name\": \"pearson_correlation\",\n \"score\": 0.8\n }\n ],\n \"status\": \"completed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment/{experiment_uuid}/finished")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-user-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_level_stats\": [\n {\n \"name\": \"pearson_correlation\",\n \"score\": 0.8\n }\n ],\n \"status\": \"completed\"\n}"
response = http.request(request)
puts response.read_body{
"parent_trace_stats": [
{
"trace_id": "<string>",
"latency": 0,
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"cost": 123,
"scores": [
{
"name": "<string>",
"score": 123,
"evaluation_metric_id": 123,
"reason": "<string>"
}
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
APIKeyHeaderAPIKeyHeaderAPIKeyHeader
Path Parameters
Body
application/json
Any additional information to be added to the experiment
Status of the experiment. Should be completed or failed
Available options:
pending, running, completed, failed List of dataset level evals/scores which should be added to the experiment. Examples are Pearson correlation between outputs and targets/ground truth values.
Show child attributes
Show child attributes
Response
Successful Response
Contains aggregated stats of all root trace logs of an experiment.
Stats of root-level trace logs of an experiment
Show child attributes
Show child attributes
Was this page helpful?
⌘I

