Reports

List All Generated Reports

Overview

This method enables you to fetch the full list of reports available for download in your organization. If your organization has more than 360 reports available, then the results will paginate.

Sample Query

Get the full list of reports available for download:

https://api.threatstack.com/v2/reports/generated-reports

Error Handling Tips

A 400 error code can occure when the list of all generated reports could not be returned due to bad request data. An example message could be, "Field is required but was not supplied" operationId: generated-reports

Request
query Parameters
token
string

This is the page token of the next set of results to fetch. Responses display paginated with 360 records per page

Responses
200

successful operation

400
429
500
get/reports/generated-reports
Response samples
application/json
{
  • "id": "string",
  • "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
  • "orgId": "string",
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "reportType": "insight",
  • "pdfStatus": "not_applicable",
  • "csvStatus": "not_applicable",
  • "jsonStatus": "not_applicable",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "scheduleId": "string",
  • "token": "string"
}

Get a Report by Report ID

Overview

This method enables you to fetch a single generated report using the report's ID

Sample Query

Get a specific generated report:

https://api.threatstack.com/v2/reports/generated-reports/{reportId}

operationId: generated-reports_reportId

Request
path Parameters
reportId
required
string

The Threat Stack-generated unique identifier (ID) for the report

Responses
200
400
429
500
get/reports/generated-reports/{reportId}
Response samples
application/json
{
  • "id": "string",
  • "categoryId": "string",
  • "orgId": "string",
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "reportType": "insight",
  • "pdfStatus": "not_applicable",
  • "csvStatus": "not_applicable",
  • "jsonStatus": "not_applicable",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "scheduleId": "string",
  • "token": "string"
}

Delete a Report by Report ID

Overview

This method enables you to delete a single generated report using the report’s ID.

Samply Query

https://api.threatstack.com/v2/reports/generated-reports/{reportId}

Error Handling Tips

400

  • Report with id {reportId} not found
  • Failed to delete report with id {reportId}

operationId: generated-reports_reportId

Request
path Parameters
reportId
required
string

The Threat Stack-generated unique identifier (ID) for the report

Responses
200
400
429
500
delete/reports/generated-reports/{reportId}
Response samples
application/json
{
  • "error": "string"
}

Generate a Report

Overview

This method enables you to generate a report using data from a specified time period.

Sample Query

Generate a report for the past seven days:

https://api.threatstack.com/v2/reports/generate-report?from=2021-12-01&until=2021-12-07

operationId: POST_generate-reports

Request
query Parameters
categoryId
required
string

The identifier (UUID) of the category in which the report belongs

reportType
required
string

The type of report generated

Value: "compliance"
from
required
string <date>

The date and time at which to start gathering data for the report.

until
required
string <date>

The date and time at which to stop gathering data for the report.

Responses
200

successful operation

400
429
500
post/reports/generate-report
Response samples
application/json
{
  • "id": "string",
  • "categoryId": "string",
  • "orgId": "string",
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "reportType": "compliance",
  • "pdfStatus": "not_applicable",
  • "csvStatus": "not_applicable",
  • "jsonStatus": "not_applicable",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "scheduleId": "string",
  • "token": "string"
}

Get a List of Schedules for Report Generation

Overview

This method enables you to fetch the full list of report generation schedules available for your organization.

Sample Query

Get a list of report generation schedules:

https://api.threatstack.com/v2/reports/scheduled-reports
Responses
200

successful operation

400
429
500
get/reports/scheduled-reports
Response samples
application/json
{
  • "scheduleId": "string",
  • "orgId": "string",
  • "reportType": "compliance",
  • "cadence": "daily",
  • "categoryComplianceId": "string"
}

Create a Schedule for Report Generation

Overview

This method enables you to create a report generation schedule for your organization.

Sample Query

Create a report generation schedule:

https://api.threatstack.com/v2/reports/scheduled-reports
Request
query Parameters
reportType
required
string

The type of report generated

Value: "compliance"
cadence
required
string

The frequency of report generation

Enum: "daily" "weekly"
complianceCategoryId
required
string

The identifier (UUID) of the compliance category in which the report belongs

Responses
200

successful operation

400
429
500
post/reports/scheduled-reports
Response samples
application/json
{
  • "scheduleId": "string",
  • "orgId": "string",
  • "reportType": "insight",
  • "cadence": "daily",
  • "categoryComplianceId": "string"
}

Get a Single Report Generation Scedule

Overview

This method enables you to fetch the information for a single report generation schedule.

Sample Query

Get a specific report generation schedule:

https://api.threatstack.com/v2/reports/scheduled-reports/{scheduleId}
Request
path Parameters
scheduleId
required
string

The Threat Stack-generated unique identifier (ID) for the schedule

Responses
200

successful operation

400
429
500
get/reports/scheduled-reports/{scheduleId}
Response samples
application/json
{
  • "scheduleId": "string",
  • "orgId": "string",
  • "reportType": "insight",
  • "cadence": "daily",
  • "categoryComplianceId": "string"
}

Delete a Single Report Generation Schedule

Overview

This method enables you to delete a single report generation schedule.

Sample Query

Delete a specific generated report:

https://api.threatstack.com/v2/reports/scheduled-reports/{scheduleId}
Request
path Parameters
scheduleId
required
string

The Threat Stack-generated unique identifier (ID) for the schedule

Responses
200

successful operation

400
429
500
delete/reports/scheduled-reports/{scheduleId}
Response samples
application/json
{
  • "error": "string"
}