Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Step-by-step guide

To inspect a pdf file using Scout APIs, follow these steps:

  1. Get token
  2. Get upload url
  3. Upload file using the url from step 2
  4. Call Scout to get the result.

Step 1. Get token

POST https://scout-api.eplansoftreview.com/api/auth

...

Code Block
{
    "success": true,
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImVwbGFuYWRtaW4iLCJpYXQiOjE1MjU0NDk2MDcsImV4cCI6MTUyNTQ1MzIwN30.5uRl1WIjpGwJaA-qVbnYI_wenzKl0bRy6RPuvp2WUzo"
}


Step 2. Get 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 PUT method. 


Step 4. Call Scout api to get the result

POST https://scout-api.eplansoftreview.com/api/scout

...