Poll batch protein lookup job status
curl --request GET \
--url https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}import requests
url = "https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}', 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://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "pending",
"job_id": "<string>",
"poll_url": "<string>",
"download_url": "<string>",
"created_at": "<string>",
"completed_count": 123,
"total_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Batch lookup
Poll batch protein lookup job status
Check the status of an async batch protein lookup. Returns 200 with a zip download URL when complete, 202 when pending, 410 when expired.
GET
/
esm
/
protein
/
api
/
v1alpha1
/
proteins
/
batch
/
jobs
/
{job_id}
Poll batch protein lookup job status
curl --request GET \
--url https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}import requests
url = "https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}', 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://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/esm/protein/api/v1alpha1/proteins/batch/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "pending",
"job_id": "<string>",
"poll_url": "<string>",
"download_url": "<string>",
"created_at": "<string>",
"completed_count": 123,
"total_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Response
Successful Response
Status of an async batch protein lookup job.
Status meanings:
pending: job submitted; pollpoll_urlfor updates.completed:download_urlprovides a time-limited URL for the result zip.cancelled: caller cancelled the job via DELETE before it completed.failed/expired: the job did not complete successfully, or its results are no longer available for download.