curl --request GET \
--url https://api.benchgen.com/api/submissions/{id}/run_status/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.benchgen.com/api/submissions/{id}/run_status/"
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/submissions/{id}/run_status/', 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/submissions/{id}/run_status/",
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/submissions/{id}/run_status/"
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/submissions/{id}/run_status/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benchgen.com/api/submissions/{id}/run_status/")
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,
"state": "queued",
"done": true,
"status": "<string>",
"score": 123,
"scores": [
{
"column": "<string>",
"key": "<string>",
"score": 123,
"primary": true
}
],
"model": "<string>",
"benchmark": {
"id": 123,
"title": "<string>",
"slug": "<string>",
"owner": "<string>",
"published": true
},
"phase_id": 123,
"created_when": "2023-11-07T05:31:56Z",
"elapsed_seconds": 123,
"error": "<string>",
"check_again_seconds": 123,
"run_path": "<string>"
}Benchmark run status
Follow a run after launching it. Poll no more often than check_again_seconds says and stop when done is true: then score holds the primary leaderboard score (finished) or error says why it did not finish (failed). run_path is the run page in the web app. Requires the benchmark:read scope.
curl --request GET \
--url https://api.benchgen.com/api/submissions/{id}/run_status/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.benchgen.com/api/submissions/{id}/run_status/"
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/submissions/{id}/run_status/', 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/submissions/{id}/run_status/",
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/submissions/{id}/run_status/"
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/submissions/{id}/run_status/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benchgen.com/api/submissions/{id}/run_status/")
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,
"state": "queued",
"done": true,
"status": "<string>",
"score": 123,
"scores": [
{
"column": "<string>",
"key": "<string>",
"score": 123,
"primary": true
}
],
"model": "<string>",
"benchmark": {
"id": 123,
"title": "<string>",
"slug": "<string>",
"owner": "<string>",
"published": true
},
"phase_id": 123,
"created_when": "2023-11-07T05:31:56Z",
"elapsed_seconds": 123,
"error": "<string>",
"check_again_seconds": 123,
"run_path": "<string>"
}Authorizations
Platform API token created under Profile Settings > Platform API tokens. Scopes are fixed at creation.
Path Parameters
submission_id from the launch response
Response
The run
A benchmark run in one small answer: what state it is in, whether it is done, its score and where to see it.
Run (submission) id
queued, preparing, running, scoring, finished, failed, cancelled True for finished, failed and cancelled
The raw platform status behind state
The leaderboard's primary score, once scored
Show child attributes
Show child attributes
Enough of a benchmark to name it and link to it. The web page is /benchmarks/{owner}/{slug}.
Show child attributes
Show child attributes
Why the run failed; null unless state is failed
Suggested wait before asking again; null once done
Web app path of the run page: /benchmarks/{owner}/{slug}/evaluations/{id}