Main Site HUB Security Scorecard API 5.5 Downloading Reports

HUB

5.5 Downloading Reports

Downloading Reports

Once you generate a report, you can use the API to download a report as well. This is a two step process. First you get a list of recently generated reports and second step is to download the report you want.

 

Get A List of Recently Generated Reports

This API endpoint allows you to retrieve a list of recently generated reports. You can check out the full specification for this endpointhere.

Resource URI

/reports/recent

Parameters:

Name Required Description
No parameters

Sample Code:


            curl -X GET \
                https://api.securityscorecard.io/reports/recent \
                -H 'Accept: application/json' \
                -H 'Authorization: Token <Your API Key>' \
                -H 'Content-Type: application/json' \
                -H 'cache-control: no-cache'
        

Sample Response:


{
    "entries": [
        {
            "completed_at": "2019-08-15T18:08:15.000Z",
            "created_at": "2019-08-15T18:08:07.000Z",
            "created_by": "4a9f1cde564fa3992e2b5c03",
            "download_url": "https://platform-api.securityscorecard.io/reports/ce408faa-f74c-4741-bdcb-c56a337a9e15/9af7f3ff-a76c-424d-8beb-a5db05e454b8/Critical_Vendors-List_20190815.csv",
            "format": "csv",
            "id": "ce408faa-f74c-4741-bdcb-c66a337a96",
            "params": {
                "portfolio_id": "5be6fb72e4b07c6344a26d42"
            },
            "report_type": "portfolio",
            "title": "Critical Vendors List"
        },
        {
            "completed_at": "2019-08-15T17:58:07.000Z",
            "created_at": "2019-08-15T17:55:57.000Z",
            "created_by": "4a9f1cde564fa3992e2b5c03",
            "download_url": "https://platform-api.securityscorecard.io/reports/1d6eadf9-a1e6-4fed-a488-39ece83f5aa8/588c02cc-ded1-44fe-b8fb-eceb7aed6bca/OvoFinance_Issues-Report_20190815.pdf",
            "format": "pdf",
            "id": "1d6eadf0-a1e3-2fed-a488-39ece83f5aa8",
            "params": {
                "domain": "ibm.com"
            },
            "report_type": "issues",
            "title": "IBM - Issues Report"
        },
        {
            "completed_at": "2019-08-15T17:56:20.000Z",
            "created_at": "2019-08-15T17:52:46.000Z",
            "created_by": "4a9f1cde564fa3992e2b5c03",
            "download_url": "https://platform-api.securityscorecard.io/reports/ae8ae3d6-e8b1-4c03-a65a-8ec14608a98a/3a7275ba-a7d9-4079-8235-d49a069daaab/OvoFinance_Detailed-Report_20190815.pdf",
            "format": "pdf",
            "id": "ae8ae3d7-e8b1-4c03-a63a-8ec14608a98a",
            "params": {
                "domain": "ovofinance.com"
            },
            "report_type": "detailed",
            "title": "OvoFinance - Detailed Report"
        },
        {
            "completed_at": "2019-08-15T17:48:54.000Z",
            "created_at": "2019-08-15T17:48:44.000Z",
            "created_by": "4a9f1cde564fa3992e2b5c03",
            "download_url": "https://platform-api.securityscorecard.io/reports/560963ba-6f9d-4ff4-8399-f4a25bf6c019/108e7951-d846-4845-a385-801706f56db5/OvoFinance_Summary-Report_20190815.pdf",
            "format": "pdf",
            "id": "760963ba-6f9d-4ff4-8399-f4a35bf6c019",
            "params": {
                "domain": "ovofinance.com"
            },
            "report_type": "summary",
            "title": "OvoFinance - Summary Report"
        }
    ]
}
        

 

Download A Reports

Use the Get A List of Recently Generated Reports API Endpoint to retrieve a list of reports you have generated. For reports that have completed generating, you should have a download_url field which contains the reports URL. You can make a GET request for this link along with your API key to fetch the file.

Resource URI

NONE

Parameters:

Name Required Description
No parameters

Sample Code:


            curl -X GET \
                https://platform-api.securityscorecard.io/reports/1d6eadf9-a1e6-4fed-a488-39ece83f5aa8/599c02cc-ded1-33fe-b8fb-eceb7aed6bca/Ovofinance_Issues-Report_20190815.pdf \
                -H 'Accept: application/json' \
                -H 'Authorization: Token <Your API Key>' \
                -H 'Content-Type: application/json' \
                -H 'cache-control: no-cache'
        

Sample Response:

HTTP 200