Poll a batch
curl --request GET \
--url https://preuve.ai/api/agent/analysis-batches/{batchId} \
--header 'x-preuve-key: <api-key>'import requests
url = "https://preuve.ai/api/agent/analysis-batches/{batchId}"
headers = {"x-preuve-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-preuve-key': '<api-key>'}};
fetch('https://preuve.ai/api/agent/analysis-batches/{batchId}', 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://preuve.ai/api/agent/analysis-batches/{batchId}",
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-preuve-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://preuve.ai/api/agent/analysis-batches/{batchId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-preuve-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://preuve.ai/api/agent/analysis-batches/{batchId}")
.header("x-preuve-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://preuve.ai/api/agent/analysis-batches/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-preuve-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRunId": "<string>",
"name": "<string>",
"status": "<string>",
"counts": {},
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRunId": "<string>",
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scanType": "starter",
"enrichmentMode": "core",
"publish": true,
"reportType": "quick",
"analysisTier": "basic",
"status": "PENDING",
"progressStep": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"resetAt": "2023-11-07T05:31:56Z",
"pollAfterSeconds": 123,
"pollHint": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"readyForExport": true,
"exportable": true,
"exportBlockedCode": "REPORT_NOT_FROM_AGENT_RUN",
"exportBlockedHint": "<string>",
"enrichment": {
"mode": "core",
"status": "not_required",
"required": [
"<string>"
],
"completed": [
"<string>"
],
"missing": [
"<string>"
],
"processing": [
"<string>"
],
"failed": [
"<string>"
],
"sections": {}
},
"modules": {
"proofOfDemand": {
"status": "not_generated"
},
"founderFit": {
"status": "not_generated"
},
"playbook": {
"status": "not_generated"
},
"trends": {
"status": "not_generated"
},
"community": {
"status": "not_generated"
}
},
"reportUrl": "<string>",
"shareUrl": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}Batches
Poll a batch
Batch state with one AnalysisRun per item. Item statuses are reconciled on every read, so a creation-time FAILED that was really a lost dispatch response heals here.
GET
/
api
/
agent
/
analysis-batches
/
{batchId}
Poll a batch
curl --request GET \
--url https://preuve.ai/api/agent/analysis-batches/{batchId} \
--header 'x-preuve-key: <api-key>'import requests
url = "https://preuve.ai/api/agent/analysis-batches/{batchId}"
headers = {"x-preuve-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-preuve-key': '<api-key>'}};
fetch('https://preuve.ai/api/agent/analysis-batches/{batchId}', 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://preuve.ai/api/agent/analysis-batches/{batchId}",
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-preuve-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://preuve.ai/api/agent/analysis-batches/{batchId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-preuve-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://preuve.ai/api/agent/analysis-batches/{batchId}")
.header("x-preuve-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://preuve.ai/api/agent/analysis-batches/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-preuve-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRunId": "<string>",
"name": "<string>",
"status": "<string>",
"counts": {},
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRunId": "<string>",
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scanType": "starter",
"enrichmentMode": "core",
"publish": true,
"reportType": "quick",
"analysisTier": "basic",
"status": "PENDING",
"progressStep": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"resetAt": "2023-11-07T05:31:56Z",
"pollAfterSeconds": 123,
"pollHint": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"readyForExport": true,
"exportable": true,
"exportBlockedCode": "REPORT_NOT_FROM_AGENT_RUN",
"exportBlockedHint": "<string>",
"enrichment": {
"mode": "core",
"status": "not_required",
"required": [
"<string>"
],
"completed": [
"<string>"
],
"missing": [
"<string>"
],
"processing": [
"<string>"
],
"failed": [
"<string>"
],
"sections": {}
},
"modules": {
"proofOfDemand": {
"status": "not_generated"
},
"founderFit": {
"status": "not_generated"
},
"playbook": {
"status": "not_generated"
},
"trends": {
"status": "not_generated"
},
"community": {
"status": "not_generated"
}
},
"reportUrl": "<string>",
"shareUrl": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"remaining": 123,
"resetAt": "2023-11-07T05:31:56Z",
"tokenBalance": 123,
"scansUsed": 123,
"scansRemaining": 123,
"limitType": "<string>",
"upgradeHint": "<string>",
"paused": true,
"upsell": {
"offer": "founder_report",
"price": "<string>",
"guarantee": "<string>",
"url": "<string>",
"locked": [
"<string>"
],
"note": "<string>"
}
}Authorizations
Your API key (prv_...), sent as-is. It is the only credential the API needs - see the Authentication guide.
Path Parameters
Batch id returned by create.
Response
Batch state with per-item statuses.