curl --request GET \
--url https://api.benchgen.com/api/competitions/{id}/spec/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.benchgen.com/api/competitions/{id}/spec/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.benchgen.com/api/competitions/{id}/spec/', 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.benchgen.com/api/competitions/{id}/spec/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.benchgen.com/api/competitions/{id}/spec/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.benchgen.com/api/competitions/{id}/spec/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benchgen.com/api/competitions/{id}/spec/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"title": "<string>",
"description": "<string>",
"terms": "<string>",
"contact_email": "jsmith@example.com",
"organization_name": "<string>",
"reward": "<string>",
"report": "<string>",
"published": true,
"pages": [
{
"title": "<string>",
"content": "<string>"
}
],
"type": "question_answer",
"items_readable": true,
"items": [
{
"question": "<string>",
"answer": "<string>",
"choices": [
"<string>"
],
"context": "<string>",
"group": "<string>"
}
],
"runs": {
"finished": 123,
"active": 123
},
"questions_frozen": true
}Read a benchmark as a spec
The benchmark’s current title, description and, when the platform still holds the sheet it was built from, its questions in the same item shape create_from_spec accepts. Benchmarks created before that sheet was kept, or from an uploaded bundle, answer with items_readable: false and an empty items list; their title and description are still returned. Only the creator and its collaborators may read a benchmark this way. Requires the benchmark:read scope.
curl --request GET \
--url https://api.benchgen.com/api/competitions/{id}/spec/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.benchgen.com/api/competitions/{id}/spec/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.benchgen.com/api/competitions/{id}/spec/', 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.benchgen.com/api/competitions/{id}/spec/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.benchgen.com/api/competitions/{id}/spec/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.benchgen.com/api/competitions/{id}/spec/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benchgen.com/api/competitions/{id}/spec/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"title": "<string>",
"description": "<string>",
"terms": "<string>",
"contact_email": "jsmith@example.com",
"organization_name": "<string>",
"reward": "<string>",
"report": "<string>",
"published": true,
"pages": [
{
"title": "<string>",
"content": "<string>"
}
],
"type": "question_answer",
"items_readable": true,
"items": [
{
"question": "<string>",
"answer": "<string>",
"choices": [
"<string>"
],
"context": "<string>",
"group": "<string>"
}
],
"runs": {
"finished": 123,
"active": 123
},
"questions_frozen": true
}Authorizations
Platform API token created under Profile Settings > Platform API tokens. Scopes are fixed at creation.
Path Parameters
Benchmark id
Response
The benchmark as a spec
256256256The benchmark's markdown tabs, in display order
Show child attributes
Show child attributes
question_answer, multiple_choice False when the platform cannot reconstruct the questions
Show child attributes
Show child attributes
Run counts for the whole benchmark.
Show child attributes
Show child attributes
True once the benchmark has been run, so its questions can no longer be replaced. Read this before offering a question change: edit_spec answers 409 for one.