Skip to content

Report - Reporting

List report history, manage report settings, and generate or download report PDFs.

Commands


report list

List previously generated reports with pagination and filtering.

1
mysecutec report list [flags]

Flags

Flag Type Default Description
--limit int 20 Maximum number of results
--offset int 0 Number of results to skip
--module-name string Filter by module name
--status string Filter by status

API

1
GET /report/v1/reports?limit=20&offset=0

Query Parameters:

Parameter Type Description
limit int Max results
offset int Skip results
module_name string Module name filter
status string Status filter

Request Example

1
mysecutec report list --module-name sdns --status sent --limit 50
1
2
3
GET /report/v1/reports?limit=50&module_name=sdns&status=sent
Authorization: Bearer <token>
Accept: application/json

Model: Report

Field Type Description
id string Report identifier
module_name string Module the report belongs to
status string Report status
subject string Report subject
locale string Report locale
frequency string Report frequency
period_start string Period start date
period_end string Period end date
has_pdf bool Whether a PDF is available
file_size_bytes int PDF file size in bytes (nullable)
pdf_expires_at string PDF expiry timestamp (nullable)
sent_at string When the report was sent (nullable)
created_at string Creation timestamp

report filter

Get available filter options for the report history.

1
mysecutec report filter [flags]

Flags

Flag Type Default Description
--module-name string Scope filter counts to a module name
--status string Scope filter counts to a status

API

1
GET /report/v1/reports/filter

Query Parameters:

Parameter Type Description
module_name string Scope counts to a module name
status string Scope counts to a status

Request Example

1
mysecutec report filter --output json
1
2
3
GET /report/v1/reports/filter
Authorization: Bearer <token>
Accept: application/json

Model: ReportFilterData

Field Type Description
module_names []ReportFilterItem Available module name options
statuses []ReportFilterItem Available status options

Model: ReportFilterItem

Field Type Description
label string Display label
value string Filter value
unfiltered_total int Total count without filters applied
filtered_total int Count with current filters applied

report settings get

Get the resolved report settings for the current user, the tenant, or specific users (admin).

1
mysecutec report settings get [flags]

Flags

Flag Type Default Description
--scope string user Settings scope (user, tenant, users)
--user-id string User ID (for scope users)

Scopes:

  • user - settings for the current user (default)
  • tenant - tenant-level settings (admin)
  • users - a specific user's settings with --user-id, or all users when omitted (admin)

API

The endpoint is resolved from the scope:

1
2
3
4
GET /report/v1/settings                  # scope user
GET /report/v1/settings/tenant           # scope tenant
GET /report/v1/settings/users/{user_id}  # scope users, with --user-id
GET /report/v1/settings/users            # scope users, --user-id omitted (all users)

Request Example

1
mysecutec report settings get --scope users --user-id 11112222-3333-4444-5555-666677778888
1
2
3
GET /report/v1/settings/users/11112222-3333-4444-5555-666677778888
Authorization: Bearer <token>
Accept: application/json

Model: ReportSettings

Field Type Description
user_id string User the settings resolve for
modules []ReportModuleSetting Per-module resolved settings

Model: ReportModuleSetting

Field Type Description
module_name string Module name
module_label string Module display label
email_enabled bool Whether email delivery is enabled
frequency string Report frequency
source string Where the resolved value originates
has_override bool Whether an override is set at this scope

Model: ReportUserListSettings (scope users, all users)

Field Type Description
users []ReportUserWithSettings Users with their resolved settings

Model: ReportUserWithSettings

Field Type Description
user_id string User identifier
email string User email
display_name string User display name
locale string User locale
modules []ReportModuleSetting Per-module resolved settings

report settings set

Update report settings by setting per-module overrides. This is a mutation and prompts for confirmation unless -y/--yes is passed.

Each --override is module_name:email_enabled:frequency, where email_enabled is true/false and frequency is one of daily, weekly, monthly, none. The flag is repeatable to set multiple modules at once.

1
mysecutec report settings set --override <module_name:email_enabled:frequency> [flags]

Flags

Flag Type Default Description
--override stringArray Module override module_name:email_enabled:frequency (repeatable)
--scope string user Settings scope (user, tenant, users)
--user-id string User ID (for scope users)
-y, --yes bool false Skip the confirmation prompt

Valid frequencies: daily, weekly, monthly, none

API

The endpoint is resolved from the scope:

1
2
3
PUT /report/v1/settings                  # scope user
PUT /report/v1/settings/tenant           # scope tenant
PUT /report/v1/settings/users/{user_id}  # scope users

Request Example

1
mysecutec report settings set --override sdns:true:weekly --override tam:false:none --yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
PUT /report/v1/settings
Authorization: Bearer <token>
Content-Type: application/json

{
  "overrides": [
    { "module_name": "sdns", "email_enabled": true, "frequency": "weekly" },
    { "module_name": "tam", "email_enabled": false, "frequency": "none" }
  ]
}

Model: ReportSettingsUpdate

Field Type Description
overrides []ReportSettingsOverride Per-module overrides to apply

Model: ReportSettingsOverride

Field Type Description
module_name string Module name
email_enabled bool Whether email delivery is enabled
frequency string Report frequency

Response

Returns the updated ReportSettings object.


report settings delete

Delete the report settings overrides for a scope, reverting to inherited defaults. This is a mutation and prompts for confirmation unless -y/--yes is passed.

1
mysecutec report settings delete [flags]

Flags

Flag Type Default Description
--scope string user Settings scope (user, tenant, users)
--user-id string User ID (for scope users)
-y, --yes bool false Skip the confirmation prompt

API

The endpoint is resolved from the scope:

1
2
3
DELETE /report/v1/settings                  # scope user
DELETE /report/v1/settings/tenant           # scope tenant
DELETE /report/v1/settings/users/{user_id}  # scope users

Request Example

1
mysecutec report settings delete --scope tenant --yes
1
2
DELETE /report/v1/settings/tenant
Authorization: Bearer <token>

report generate

Generate a report on demand for a module and period. This is a mutation and prompts for confirmation unless -y/--yes is passed. The report is returned as a PDF and written to disk (default <module_name>.pdf, override with --output-file).

1
mysecutec report generate --module-name <name> --period-start <date> --period-end <date> [flags]

Flags

Flag Type Default Description
--module-name string Module to generate the report for (required)
--period-start string Period start date (required)
--period-end string Period end date (required)
--locale string Report locale (e.g. en, nl)
--output-file string <module_name>.pdf File to write the PDF to
-y, --yes bool false Skip the confirmation prompt

API

1
POST /report/v1/reports/generate

Responds with a PDF blob (Accept: application/pdf) rather than JSON.

Request Example

1
mysecutec report generate --module-name sdns --period-start 2025-05-01 --period-end 2025-05-31 --locale nl --output-file may.pdf --yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
POST /report/v1/reports/generate
Authorization: Bearer <token>
Content-Type: application/json
Accept: application/pdf

{
  "module_name": "sdns",
  "period_start": "2025-05-01",
  "period_end": "2025-05-31",
  "locale": "nl"
}

Model: ReportGenerateRequest

Field Type Description
module_name string Module to generate the report for
period_start string Period start date
period_end string Period end date
locale string Report locale (optional)

Response

The generated PDF is written to disk; no JSON body is returned.


report download

Download the PDF for a previously generated report by id. The PDF is written to disk (default <id>.pdf, override with --output-file).

1
mysecutec report download <id> [flags]

Flags

Flag Type Default Description
--output-file string <id>.pdf File to write the PDF to

API

1
GET /report/v1/reports/{id}/download

Responds with a PDF blob rather than JSON.

Request Example

1
mysecutec report download 99998888-7777-6666-5555-444433332222 --output-file report.pdf
1
2
3
GET /report/v1/reports/99998888-7777-6666-5555-444433332222/download
Authorization: Bearer <token>
Accept: application/json

Response

The PDF is written to disk; no JSON body is returned.