Skip to main content
POST
/
api
/
parea
/
v1
/
experiment
Create Experiment Api
curl --request POST \
  --url https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment \
  --header 'Content-Type: application/json' \
  --header 'x-user-id: <api-key>' \
  --data '
{
  "name": "<string>",
  "project_uuid": "<string>",
  "run_name": "<string>",
  "is_public": false,
  "metadata": {}
}
'
import requests

url = "https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment"

payload = {
"name": "<string>",
"project_uuid": "<string>",
"run_name": "<string>",
"is_public": False,
"metadata": {}
}
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({
name: '<string>',
project_uuid: '<string>',
run_name: '<string>',
is_public: false,
metadata: {}
})
};

fetch('https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment', 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",
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([
'name' => '<string>',
'project_uuid' => '<string>',
'run_name' => '<string>',
'is_public' => false,
'metadata' => [

]
]),
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"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"project_uuid\": \"<string>\",\n \"run_name\": \"<string>\",\n \"is_public\": false,\n \"metadata\": {}\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")
.header("x-user-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"project_uuid\": \"<string>\",\n \"run_name\": \"<string>\",\n \"is_public\": false,\n \"metadata\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/experiment")

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 \"name\": \"<string>\",\n \"project_uuid\": \"<string>\",\n \"run_name\": \"<string>\",\n \"is_public\": false,\n \"metadata\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "project_uuid": "<string>",
  "uuid": "<string>",
  "created_at": "<string>",
  "run_name": "<string>",
  "is_public": false,
  "metadata": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

x-user-id
string
header
required

Body

application/json
name
string
required

Name of the experiment

project_uuid
string
required

UUID of the project associated with this experiment

run_name
string | null

Name of the run. Must be unique for each experiment and can only contain alphanumeric characters, hyphens, and underscores.

is_public
boolean
default:false

If experiment should be public

metadata
Metadata · object | null

Any additional key-value pairs which provide context or are useful for filtering.

Response

Successful Response

name
string
required

Name of the experiment

project_uuid
string
required

UUID of the project associated with this experiment

uuid
string
required

UUID of the created experiment

created_at
string
required

Timestamp the experiment was created

run_name
string | null

Name of the run. Must be unique for each experiment and can only contain alphanumeric characters, hyphens, and underscores.

is_public
boolean
default:false

If experiment should be public

metadata
Metadata · object | null

Any additional key-value pairs which provide context or are useful for filtering.