API
POST /analyze/files
Send PDFs to be analyzed.- baseFile - base pdf file
- testFile - test pdf file
- apiKey - your api key
-
webhook url (optional)
Instead of polling job status web hook sends a message and data to a specific URL the exact moment a job is finished. Web hook endpoint should be prepared to receive POST request with following parameters:
- jobId - job id
- state - job state
- report - json version of report
- reportUrl - url to full, html report
-
ignore regions (optional)
Ignore regions let you exclude dynamic parts of a PDF (timestamps, signatures, page numbers, etc.) from comparison
- x - x coordinate in pdf coordinate system
- y - y coordinate in pdf coordinate system
- width
- height
- page - 0 based page number
response
- 401 - invalid api key or no quota left
- 403 - no quota left
- 200 - job queued
- jobId - job identifier
- status - current job status
example
curl -X POST https://pdfregression.com/api/pdf/analyze/files -F "baseFile=@t5a.pdf" -F "testFile=@t5b.pdf" -F "apiKey=xxx"
POST /analyze/urls
Send links to PDFs to be analyzed.- baseFileUrl - url to base pdf file
- testFileUrl - url to test pdf file
- apiKey - your api key
-
webhook url (optional)
Instead of polling job status web hook sends a message and data to a specific URL the exact moment a job is finished. Web hook endpoint should be prepared to receive POST request with following parameters:
- jobId - job id
- state - job state
- report - json version of report
- reportUrl - url to full, html report
-
ignore regions (optional)
Ignore regions let you exclude dynamic parts of a PDF (timestamps, signatures, page numbers, etc.) from comparison
- x - x coordinate in pdf coordinate system
- y - y coordinate in pdf coordinate system
- width
- height
- page - 0 based page number
response
- 401 - invalid api key or no quota left
- 403 - no quota left
- 200 - job queued
- jobId - job identifier
- status - current job status
example
curl -X POST https://pdfregression.com/api/pdf/analyze -H "Content-Type: application/json"
-d "{\"baseFileUrl\": \"__URL1__\", \"testFileUrl\": \"__URL2__\", \"apiKey\": \"__API_KEY__\",
\"ignoreRegions\": [{\"x\":10, "\"y\":10,\"width\":100,\"height\":100}]}"
GET /analyze/status
Get job status.- jobId - job identifier
- apiKey - your api key
response
- jobId - job identifier
- status - current job status
- report - comparison result report in json form
- fullReportUrl - url to full html report with visual differences
example
curl -X GET https://pdfregression.com/api/pdf/analyze/status -H "Content-Type: application/json"
-d "{\"jobId\":\"__JOB_ID__"\", \"apiKey\": \"__API_KEY__\"}"