This article describes how to utilize the PDF Scout inspector to analyze incoming plan review documents to eplansoft REVIEW (EPR).
...
Prerequisites
See: Scout PDF Inspector
...
Step-by-step guide
Scout inspections are performed asynchronously.
...
Get a token.
Obtain the credentials from the EPR Environment/Partners page, see Accessing the Connect API for partner integration via Swagger.
- Use the credentials for an existing EPR administrator's account.
- Get an upload url
- Upload file using the url from step 2
- Call Scout to get the json result.
...
Info | ||
---|---|---|
| ||
Tokens automatically expire after 3 hours of inactivity. |
Step 1. Get a token
POST https://scout-api.eplansoftreview.com/api/auth
...
Code Block |
---|
{ "success": true, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImVwbGFuYWRtaW4iLCJpYXQiOjE1MjU0NDk2MDcsImV4cCI6MTUyNTQ1MzIwN30.5uRl1WIjpGwJaA-qVbnYI_wenzKl0bRy6RPuvp2WUzo" } |
Step 2. Get an Upload Url
GET https://scout-api.eplansoftreview.com/api/uploadUrl?filename=your_filename
...
Code Block |
---|
{ "success": true, "message": "Use the method and url to upload file to Scout server.", "data": { "method": "PUT", "url": "https://eplan-scout.s3.us-west-2.amazonaws.com/1525449678912evil.pdf?Content-Type=application%2Fpdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIGT7NUYPP3IOYOBA%2F20180504%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20180504T160118Z&X-Amz-Expires=300&X-Amz-Signature=0cf8ad94edf98902134f7909246549d2b1059fc228bb2054f9fea42d33f2f1a2&X-Amz-SignedHeaders=host", "contentType": "application/pdf", "filename": "sample.pdf", "filePath": "1525449678912sample.pdf" } } |
Step 3. Upload file to Scout Server
PUT [url_from_last_step]
Note: You must upload file using the PUT method.
Step 4. Call Scout api to get the result
POST
https://scout-api.eplansoftreview.com/api/scout
...
Code Block |
---|
{ "success": true, "data": { "filename": "1525449678912sample.pdf", "filesize": 73121, "numPages": 1, "outlines": null, "results": [ { "key": "accessible", "success": true, "value": null }, { "key": "version", "success": true, "value": "1.7" }, { "key": "size", "success": true, "value": "0.07MB" }, { "key": "rotation", "success": true, "value": null }, { "key": "pageAccess", "success": true, "value": null }, { "key": "annotation", "success": true, "value": null }, { "key": "resolution", "success": true, "value": null } ], "pages": [ { "pageNumber": 1, "dimension": { "pageNumber": 1, "mediaBox": [ 0, 0, 1728, 1296 ], "rotate": 0, "orientation": "Landscape", "width": 1728, "height": 1296 }, "pageAccess": { "value": null, "errMessage": null, "debugData": null }, "annotation": { "value": null, "errMessage": null, "debugData": null }, "resolution": { "value": null, "errMessage": null, "debugData": null } } ], "pageDimensions": { "1": { "pageNumber": 1, "mediaBox": [ 0, 0, 1728, 1296 ], "rotate": 0, "orientation": "Landscape", "width": 1728, "height": 1296 } }, "author": "", "version": 1.7, "isPassed": true } } |
Determining the Results
Check "isPassed" value in the response body to see if the file passes Scout.
...