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": "QUEUED",
"created_at": "<string>",
"completed_at": "<string>",
"updated_at": "<string>",
"progress": 123,
"eta_seconds": 123,
"queue_position": 123,
"stop_requested_at": "<string>",
"early_deployable": false,
"evaluation_id": "<string>",
"evaluation_status": "QUEUED",
"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": "QUEUED",
"created_at": "<string>",
"completed_at": "<string>",
"updated_at": "<string>",
"progress": 123,
"eta_seconds": 123,
"queue_position": 123,
"stop_requested_at": "<string>",
"early_deployable": false,
"evaluation_id": "<string>",
"evaluation_status": "QUEUED",
"evaluation_message": "<string>"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your Nugen API key, sent as a Bearer token
Path Parameters
ID of the alignment project, returned when it was created
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.
Unique identifier of the alignment project.
Lifecycle status of a resource that runs asynchronously. Stored as is and returned as is, with no translation in between.
QUEUED: accepted and waiting for its workflow to startPROCESSING: runningREADY: finished successfullyFAILED: failed at any stageSTOPPED: stopped by the user before completion
QUEUED, PROCESSING, READY, FAILED, STOPPED Timestamp when the project was created.
Timestamp when the project completed; null while still running.
Last update timestamp.
Completion progress, 0.0 to 100.0. Not wired up yet, always null.
Estimated time remaining in seconds. Not wired up yet, always null.
Place in the queue while status is QUEUED, 1 meaning next to start.
Set once a stop was requested; the run ends STOPPED.
True once train-time alignment has written a checkpoint, so POST /models/{model_id}/deployment?early=true will succeed. Only meaningful while status is still PROCESSING; false once train-time alignment has finished, since a normal deploy applies then.
The evaluation created from benchmark_id once train-time alignment finished.
Status of that evaluation, so one poll shows both.
QUEUED, PROCESSING, READY, FAILED, STOPPED Why the evaluation could not be created or why it failed.
Was this page helpful?