Get Job Result
curl --request GET \
--url https://api.gonitro.dev/jobs/{jobID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gonitro.dev/jobs/{jobID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gonitro.dev/jobs/{jobID}', 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.gonitro.dev/jobs/{jobID}",
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.gonitro.dev/jobs/{jobID}"
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.gonitro.dev/jobs/{jobID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gonitro.dev/jobs/{jobID}")
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{
"jobID": "01234567-89ab-cdef-0123-456789abcdef",
"status": "completed",
"result": {
"file": {
"URL": "<string>",
"contentType": "application/json",
"metadata": {
"fileSizeBytes": 123,
"pageCount": 123
}
}
}
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#400-bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Request validation failed",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#401-unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid Authorization header",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#404-not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#413-content-too-large",
"title": "Content too large",
"status": 413,
"detail": "Uploaded document exceeds the file size limit",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#422-unprocessable-entity",
"title": "Unprocessable Entity",
"status": 422,
"detail": "The request was well-formed but could not be processed",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#500-internal-server-error",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error occurred",
"instance": "/platform/jobs/{jobID}"
}Jobs
Job Results
Retrieve the result of a completed asynchronous Nitro API conversion, transformation, or extraction job.
GET
/
jobs
/
{jobID}
Get Job Result
curl --request GET \
--url https://api.gonitro.dev/jobs/{jobID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gonitro.dev/jobs/{jobID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gonitro.dev/jobs/{jobID}', 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.gonitro.dev/jobs/{jobID}",
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.gonitro.dev/jobs/{jobID}"
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.gonitro.dev/jobs/{jobID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gonitro.dev/jobs/{jobID}")
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{
"jobID": "01234567-89ab-cdef-0123-456789abcdef",
"status": "completed",
"result": {
"file": {
"URL": "<string>",
"contentType": "application/json",
"metadata": {
"fileSizeBytes": 123,
"pageCount": 123
}
}
}
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#400-bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Request validation failed",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#401-unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid Authorization header",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#404-not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#413-content-too-large",
"title": "Content too large",
"status": 413,
"detail": "Uploaded document exceeds the file size limit",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#422-unprocessable-entity",
"title": "Unprocessable Entity",
"status": 422,
"detail": "The request was well-formed but could not be processed",
"instance": "/platform/jobs/{jobID}"
}{
"type": "https://developers.gonitro.com/docs/build-nitro/errors#500-internal-server-error",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error occurred",
"instance": "/platform/jobs/{jobID}"
}The Job Result endpoint returns the result of an asynchronous Conversion, Transformation, or Extraction job.
The possible values of the status field are:
completed: The job completed successfully. The response includes the result: one or more file links for Conversion and Transformation jobs, a JSON payload for Extraction jobs, or a binary string.failed: The job failed during processing. The response includes an error field describing the failure.canceled: The job was canceled by the user.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Controls response format and behavior. See endpoint description above for detailed response combinations.
application/json: Returns JSON response with operation resultapplication/octet-stream: Returns binary file content*/*: Defaults to JSON response
Available options:
application/json, application/octet-stream, */* Path Parameters
The unique identifier of the job.
Response
Job result
- Completed
- Failed
- Canceled
Example:
"01234567-89ab-cdef-0123-456789abcdef"
Available options:
completed result
Sync - Single File · objectSync - Multiple Files · objectstringTables · objectText Boxes · objectPII Boxes · objectProperties · objectForm Fields · object
The result is returned as data in the same format as the original request's synchronous response type. Transformations and Conversions return one or more files, while Extractions return a JSON object containing the requested data.
Show child attributes
Show child attributes