Failure analysis and trends
curl --request GET \
--url https://api.autoprintfarm.com/public/v1/analytics/failures \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.autoprintfarm.com/public/v1/analytics/failures"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.autoprintfarm.com/public/v1/analytics/failures', 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.autoprintfarm.com/public/v1/analytics/failures",
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.autoprintfarm.com/public/v1/analytics/failures"
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.autoprintfarm.com/public/v1/analytics/failures")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autoprintfarm.com/public/v1/analytics/failures")
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{
"success": true,
"data": {
"date_range": {
"from": "<string>",
"to": "<string>"
},
"summary": {
"total_failures": 123,
"resolved": 123,
"unresolved": 123,
"resolution_rate": 123
},
"by_type": [
{
"failure_type": "<string>",
"count": 123
}
],
"by_printer": [
{
"printer_id": "<string>",
"printer_name": "<string>",
"count": 123
}
],
"daily_trend": [
{
"date": "<string>",
"count": 123
}
],
"recent": [
{
"id": "<string>",
"printer_id": "<string>",
"printer_name": "<string>",
"file_name": "<string>",
"failure_type": "<string>",
"failure_reason": "<string>",
"error_code": "<string>",
"progress_at_failure": 123,
"layer_at_failure": 123,
"resolved_at": "<string>",
"created_at": "<string>"
}
]
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}Analytics
Failure analysis and trends
Returns failure counts grouped by type, by printer, daily trend, and the 20 most recent failures. Internal resolver IDs and resolution notes are not exposed.
GET
/
analytics
/
failures
Failure analysis and trends
curl --request GET \
--url https://api.autoprintfarm.com/public/v1/analytics/failures \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.autoprintfarm.com/public/v1/analytics/failures"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.autoprintfarm.com/public/v1/analytics/failures', 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.autoprintfarm.com/public/v1/analytics/failures",
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.autoprintfarm.com/public/v1/analytics/failures"
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.autoprintfarm.com/public/v1/analytics/failures")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autoprintfarm.com/public/v1/analytics/failures")
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{
"success": true,
"data": {
"date_range": {
"from": "<string>",
"to": "<string>"
},
"summary": {
"total_failures": 123,
"resolved": 123,
"unresolved": 123,
"resolution_rate": 123
},
"by_type": [
{
"failure_type": "<string>",
"count": 123
}
],
"by_printer": [
{
"printer_id": "<string>",
"printer_name": "<string>",
"count": 123
}
],
"daily_trend": [
{
"date": "<string>",
"count": 123
}
],
"recent": [
{
"id": "<string>",
"printer_id": "<string>",
"printer_name": "<string>",
"file_name": "<string>",
"failure_type": "<string>",
"failure_reason": "<string>",
"error_code": "<string>",
"progress_at_failure": 123,
"layer_at_failure": 123,
"resolved_at": "<string>",
"created_at": "<string>"
}
]
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}Authorizations
API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.
Query Parameters
Start of the reporting window (ISO date, e.g. 2026-01-01). Defaults to 30 days ago.
End of the reporting window (ISO date). Defaults to today.
Filter by printer ID
Was this page helpful?
⌘I