Get Document Status
curl --request GET \
--url https://api.nugen.in/api/v3/knowledge/{document_id}/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/knowledge/{document_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/knowledge/{document_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/knowledge/{document_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/knowledge/{document_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/knowledge/{document_id}/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/knowledge/{document_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{
"completed_at": "2024-01-15T10:31:00Z",
"created_at": "2024-01-15T10:30:00Z",
"document_id": "document_01k4x9m2p7q3r5sa",
"status": "READY",
"updated_at": "2024-01-15T10:31:00Z"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Knowledge
Get Document Status
Check the upload status of a document.
Use this endpoint to monitor the progress of a document upload after receiving its document_id from the upload endpoint. The status indicates whether the document is still being uploaded, has completed successfully, or has failed.
Args:
document_id: Document ID returned from the upload endpoint (path parameter)
Returns:
dict: Upload status information containing:
- status: Current upload status (“QUEUED”, “PROCESSING”, “READY”, “FAILED”)
- document_id: Document ID once upload is COMPLETED (null if still uploading)
- created_at, completed_at, updated_at: timestamps
- progress: not wired up yet, always null
- eta_seconds: estimated seconds until completion (QUEUED/PROCESSING only)
Raises:
404: If the document is not found or doesn’t belong to the user
Example: Request:
/api/v3/knowledge/{document_id}/status
Headers: {"Authorization": "Bearer <api_key>"}
Response:
{
"status": "READY",
"document_id": "document_01k4x9m2p7q3r5sa",
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:31:00Z",
"updated_at": "2024-01-15T10:31:00Z",
"progress": null,
"eta_seconds": 42
}
GET
/
api
/
v3
/
knowledge
/
{document_id}
/
status
Get Document Status
curl --request GET \
--url https://api.nugen.in/api/v3/knowledge/{document_id}/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/knowledge/{document_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/knowledge/{document_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/knowledge/{document_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/knowledge/{document_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/knowledge/{document_id}/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/knowledge/{document_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{
"completed_at": "2024-01-15T10:31:00Z",
"created_at": "2024-01-15T10:30:00Z",
"document_id": "document_01k4x9m2p7q3r5sa",
"status": "READY",
"updated_at": "2024-01-15T10:31:00Z"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Returns the processing status for a document upload: QUEUED, PROCESSING, READY or FAILED, with the document_id once READY, and timestamps.
Processing status of one document.
Was this page helpful?