curl --request GET \
--url https://api.nixtla.io/v2/anomaly_detection/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nixtla.io/v2/anomaly_detection/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nixtla.io/v2/anomaly_detection/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://api.nixtla.io/v2/anomaly_detection/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",
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.nixtla.io/v2/anomaly_detection/jobs/{job_id}"
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.nixtla.io/v2/anomaly_detection/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixtla.io/v2/anomaly_detection/jobs/{job_id}")
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{
"job_id": "<string>",
"status": "pending",
"result": "<unknown>",
"error": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get async anomaly_detection job status
Returns the current state of a anomaly_detection job. result is populated once status is succeeded. A job_id belonging to a different task returns 404, so ids cannot be polled across endpoints.
curl --request GET \
--url https://api.nixtla.io/v2/anomaly_detection/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nixtla.io/v2/anomaly_detection/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nixtla.io/v2/anomaly_detection/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://api.nixtla.io/v2/anomaly_detection/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",
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.nixtla.io/v2/anomaly_detection/jobs/{job_id}"
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.nixtla.io/v2/anomaly_detection/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixtla.io/v2/anomaly_detection/jobs/{job_id}")
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{
"job_id": "<string>",
"status": "pending",
"result": "<unknown>",
"error": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
HTTPBearer
Path Parameters
Response
Successful Response
A job's current state, polled from the per-task status endpoint.
result is populated only once status is succeeded, and stays null for a binary task whose
output is a zip — that arrives from the task's dedicated result endpoint instead.
The job this status describes.
Lifecycle state; terminal states are succeeded, failed, cancelled.
pending, running, succeeded, failed, cancelled The task's output once succeeded; null while pending, and for binary tasks.
Failure detail when status is failed; otherwise null.
ISO-8601 timestamp of when the job was accepted.
ISO-8601 timestamp of the last state transition.
Was this page helpful?