curl --request GET \
--url https://api.nugen.in/api/v3/alignment-projects/{alignment_id}/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/alignment-projects/{alignment_id}/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.nugen.in/api/v3/alignment-projects/{alignment_id}/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.nugen.in/api/v3/alignment-projects/{alignment_id}/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.nugen.in/api/v3/alignment-projects/{alignment_id}/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.nugen.in/api/v3/alignment-projects/{alignment_id}/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/alignment-projects/{alignment_id}/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{
"alignment_id": "<string>",
"status": "CREATED",
"created_at": "<string>",
"completed_at": "<string>",
"updated_at": "<string>",
"progress": 123,
"eta_seconds": 123,
"queue_position": 123,
"stop_requested_at": "2023-11-07T05:31:56Z",
"early_deployable": false,
"evaluation_id": "<string>",
"evaluation_status": "CREATED",
"evaluation_message": "<string>"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Alignment Status
The polled status of one alignment project.
Returns the state and its qualifiers only. Configuration, documents, metrics, and failure qualifiers (degraded, stage_failures, error) never change while a run executes or live on the detail route instead, so they are not re-sent on every poll.
curl --request GET \
--url https://api.nugen.in/api/v3/alignment-projects/{alignment_id}/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/alignment-projects/{alignment_id}/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.nugen.in/api/v3/alignment-projects/{alignment_id}/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.nugen.in/api/v3/alignment-projects/{alignment_id}/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.nugen.in/api/v3/alignment-projects/{alignment_id}/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.nugen.in/api/v3/alignment-projects/{alignment_id}/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/alignment-projects/{alignment_id}/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{
"alignment_id": "<string>",
"status": "CREATED",
"created_at": "<string>",
"completed_at": "<string>",
"updated_at": "<string>",
"progress": 123,
"eta_seconds": 123,
"queue_position": 123,
"stop_requested_at": "2023-11-07T05:31:56Z",
"early_deployable": false,
"evaluation_id": "<string>",
"evaluation_status": "CREATED",
"evaluation_message": "<string>"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Returns the current status of an alignment project: state, timestamps, queue position and stop qualifier. Poll this; fetch the full record, including failure qualifiers, once from GET /alignment-projects/{alignment_id}.
The polled view of one run: state, its qualifiers, nothing that never changes mid run. Configuration and documents live on the detail route.
Lifecycle status of a resource that runs asynchronously. Stored as is and returned as is, with no translation in between.
CREATED: record saved to the DB, not yet placed on the worker queueQUEUED: on the worker queue, waiting for a worker to pick it upPROCESSING: runningREADY: finished successfullyFAILED: failed at any stageSTOPPED: stopped by the user before completion
CREATED, QUEUED, PROCESSING, READY, FAILED, STOPPED Was this page helpful?