curl --request POST \
--url https://api.heybee.app/v1/experiments/{experiment_id}/votes/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dry_run": false,
"sample_map": {}
}
'import requests
url = "https://api.heybee.app/v1/experiments/{experiment_id}/votes/import"
payload = {
"source_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dry_run": False,
"sample_map": {}
}
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({
source_experiment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
dry_run: false,
sample_map: {}
})
};
fetch('https://api.heybee.app/v1/experiments/{experiment_id}/votes/import', 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.heybee.app/v1/experiments/{experiment_id}/votes/import",
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([
'source_experiment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'dry_run' => false,
'sample_map' => [
]
]),
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://api.heybee.app/v1/experiments/{experiment_id}/votes/import"
payload := strings.NewReader("{\n \"source_experiment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dry_run\": false,\n \"sample_map\": {}\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://api.heybee.app/v1/experiments/{experiment_id}/votes/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"source_experiment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dry_run\": false,\n \"sample_map\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heybee.app/v1/experiments/{experiment_id}/votes/import")
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 \"source_experiment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dry_run\": false,\n \"sample_map\": {}\n}"
response = http.request(request)
puts response.read_body{
"already_imported": 123,
"dry_run": true,
"experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"importable": 123,
"imported": 123,
"mapped_samples": 123,
"participants_created": 123,
"skipped": {
"cross_anchor": 0,
"duplicate_pair": 0,
"exam": 0,
"invalidated": 0,
"outcome": 0,
"same_candidate": 0,
"same_sample": 0,
"unmapped": 0
},
"source_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_votes": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Import Experiment Votes
Copy the votes of another evaluation into this one.
For outputs re-uploaded to a new evaluation (samples cannot be replaced in place):
each source vote whose two samples map to samples of this evaluation is copied,
with its original time, outcome, criterion outcomes and reliability, and a link to
the source vote. The map is sample_map where given, else the sample with the same
anchor value and candidate key. Copied votes come from an imported voter (one per
source voter), charge no credits and earn no rewards. Exam, invalidated and
unmappable votes are skipped. Idempotent: a vote is copied at most once. Rankings,
confidence and parameter analysis include the copies after the next recompute
(within minutes).
curl --request POST \
--url https://api.heybee.app/v1/experiments/{experiment_id}/votes/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dry_run": false,
"sample_map": {}
}
'import requests
url = "https://api.heybee.app/v1/experiments/{experiment_id}/votes/import"
payload = {
"source_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dry_run": False,
"sample_map": {}
}
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({
source_experiment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
dry_run: false,
sample_map: {}
})
};
fetch('https://api.heybee.app/v1/experiments/{experiment_id}/votes/import', 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.heybee.app/v1/experiments/{experiment_id}/votes/import",
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([
'source_experiment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'dry_run' => false,
'sample_map' => [
]
]),
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://api.heybee.app/v1/experiments/{experiment_id}/votes/import"
payload := strings.NewReader("{\n \"source_experiment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dry_run\": false,\n \"sample_map\": {}\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://api.heybee.app/v1/experiments/{experiment_id}/votes/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"source_experiment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dry_run\": false,\n \"sample_map\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heybee.app/v1/experiments/{experiment_id}/votes/import")
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 \"source_experiment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dry_run\": false,\n \"sample_map\": {}\n}"
response = http.request(request)
puts response.read_body{
"already_imported": 123,
"dry_run": true,
"experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"importable": 123,
"imported": 123,
"mapped_samples": 123,
"participants_created": 123,
"skipped": {
"cross_anchor": 0,
"duplicate_pair": 0,
"exam": 0,
"invalidated": 0,
"outcome": 0,
"same_candidate": 0,
"same_sample": 0,
"unmapped": 0
},
"source_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_votes": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Copy votes from another evaluation into this one.
The evaluation whose votes are copied
Count what would be imported; change nothing
Source sample id -> sample id in this evaluation. Samples not listed map to the sample of this evaluation with the same anchor value and candidate key.
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes

