Main Site HUB Security Scorecard API 5.4 Generate a Portfolio Report For A Scorecard

HUB

5.4 Generate a Portfolio Report For A Scorecard

Generate a Portfolio Report For A Scorecard

SecurityScorecard allows you to generate reports via an API. You can generate the same set of reports that are available from the platform via the API. This API endpoint allows you to generate a portfolio report. The report includes a list of companies in the portfolio with following information:

  • 30 Day Score Change
  • Security Rating
  • Name of the Company
  • Industry
  • Status (Active or Inactive)

You can check out the full specification for this endpoint here.

Resource URI

/reports/portfolio

Parameters:

Name Required Description
Portfolio ID Y The ID of the portfolio for which you want to generate this report
Format Y Either csv or pdf format.

Sample Code:


    curl -X POST \
        https://api.securityscorecard.io/reports/portfolio \
        -H 'Accept: application/json' \
        -H 'Authorization: Token <Your API Key>' \
        -H 'Content-Type: application/json' \
        -H 'cache-control: no-cache' \
        -d '{"format": "csv", "portfolio_id": "5be6fb72e4b07c7253a47d33"}'
        

Sample Response:


{
    "created_at": "2019-08-15T18:08:07.087Z",
    "created_by": "5a9f1cde564fa4662e2b5d03",
    "id": "ce408faa-f74c-4741-bdcb-c56a337a9e15",
    "params": {
        "format": "csv",
        "portfolio_id": "5be7fb72e4b08c6255a26d43"
    },
    "report_type": "portfolio"
}