Python SDK
from revenuebase_sdk import RevenuebaseClient
client = RevenuebaseClient()
job = client.jobs.get(process_id=42)
print(job.current_status)curl --request GET \
--url https://api.revenuebase.ai/v2/jobs/{process_id} \
--header 'x-key: <api-key>'const options = {method: 'GET', headers: {'x-key': '<api-key>'}};
fetch('https://api.revenuebase.ai/v2/jobs/{process_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.revenuebase.ai/v2/jobs/{process_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 => [
"x-key: <api-key>"
],
]);
$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.revenuebase.ai/v2/jobs/{process_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-key", "<api-key>")
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.revenuebase.ai/v2/jobs/{process_id}")
.header("x-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/jobs/{process_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"process_id": 123,
"filename": "<string>",
"current_status": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Job Processes
Get batch job status
Returns the current processing status for a batch job. Only the user who submitted the job can query it.
Possible statuses: QUEUED, PROCESSING, COMPLETED, ERROR, CANCELLING, CANCELLED.
Errors
400— Invalidprocess_idor job does not belong to your account.
GET
/
v2
/
jobs
/
{process_id}
Python SDK
from revenuebase_sdk import RevenuebaseClient
client = RevenuebaseClient()
job = client.jobs.get(process_id=42)
print(job.current_status)curl --request GET \
--url https://api.revenuebase.ai/v2/jobs/{process_id} \
--header 'x-key: <api-key>'const options = {method: 'GET', headers: {'x-key': '<api-key>'}};
fetch('https://api.revenuebase.ai/v2/jobs/{process_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.revenuebase.ai/v2/jobs/{process_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 => [
"x-key: <api-key>"
],
]);
$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.revenuebase.ai/v2/jobs/{process_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-key", "<api-key>")
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.revenuebase.ai/v2/jobs/{process_id}")
.header("x-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/jobs/{process_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"process_id": 123,
"filename": "<string>",
"current_status": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Was this page helpful?
⌘I
