API v2: Reports

This section describes the API endpoints related to report management. The reporting functionality is based on three core data models that represent report definitions, report subscriptions, and generated reports.


The following data models are used:

  • ReportModel – represents a report generated on demand for a specific subset of sessions, defined by filtering parameters.

  • DefinedReportSubscriptionModel – represents a user-defined subscription for automatic, periodic report generation.

  • DefinedReportModel – represents a user-defined periodic report definition based on custom filtering parameters.

Data Structures: ReportModel

ReportModel

Attribute

Type

Required

Description

id

string

Unique and read-only object Identifier

title

string

Report title.

defined_report_id

string

Defined report identifier.

report_type

string

Read-only. Expensive to use.

generated_at

string

Read-only. Report generated timestamp.

created_by

string

Identifier of the user who created the report.

query_filter

string

Query filter used to create the report.

query_order

string

Query order of returned values used to create the report.

created_on

string

Read-only.

created_at

datetime

Read-only. Timestamp of creation.

modified_at

datetime

Read-only. Timestamp of modification.

removed

boolean

Read-only

Retrieve Available Attributes of the ReportModel

Request

Method

GET

Path

/api/v2/objspec/report

Data Structures: DefinedReportSubscriptionModel

A report subscription is a configuration that enables automatic generation of a report for a user at defined intervals.

DefinedReportSubscriptionModel

Attribute

Type

Required

Description

id

string

Unique and read-only report subscription identifier

defined_report_id

string

Defined report identifier.

user_id

string

Identifier of the user who created the report. Requires read right on the user object for GET, POST, and DELETE operations.

period

string {day, week, month, quarter, year}

Period of generating reports.

created_by

string

Identifier of the user who created the report.

created_at

datetime

Read-only. Timestamp of creation.

modified_at

datetime

Read-only. Timestamp of modification.

removed

boolean

Read-only

Retrieve Available Attributes of the DefinedReportSubscriptionModel

Request

Method

GET

Path

/api/v2/objspec/defined_report_subscription

Data Structures: DefinedReportModel

DefinedReportModel

Attribute

Type

Required

Description

id

string

Unique and read-only object Identifier

title

string

Defined report title.

type

string

Immutable. Defined report type.

query_filter

string

Query filter used to create the report.

query_order

string

Query order of returned values used to create the report.

created_by

string

Immutable. Identifier of the user who created the report.

created_at

datetime

Read-only. Timestamp of creation.

modified_at

datetime

Read-only. Timestamp of modification.

removed

boolean

Read-only

builtin

boolean

Read-only; Expensive to use; If true, the object is not editable.

hidden

boolean

Read-only; Expensive to use; If true, the object is hidden in UI.

Retrieve Available Attributes of the DefinedReportModel

Request

Method

GET

Path

/api/v2/objspec/defined_report

To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.


Get List of Generated Reports

Request

Method

GET

Path

/api/v2/report

Example Request

GET /api/v2/report

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/report'

Get List of Predefined Report Definitions

Request

Method

GET

Path

/api/v2/report/defined

Example Request

GET /api/v2/report/defined

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/report/defined'

Get List of Subscriptions to Periodic Reports

Request

Method

GET

Path

/api/v2/report/subscription

Example Request

GET /api/v2/report/subscription

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/report/subscription'

Get or Download Report File

Request

Method

GET

Path

/api/v2/report/<id>/<ext>

Path

/api/v2/report/download/<id>/<ext>

You can use one of three available extensions: csv, pdf, or html.


Example Request

GET /api/v2/report/<id>/html

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/report/9124292845052624897/html'

Response

Report in HTML.


Subscribe to a Periodic Report

This endpoint creates a subscription for a periodic report for the currently authenticated user, enabling automatic report generation based on the configured schedule.

Request

Method

POST

Path

/api/v2/report/subscription

Headers

Content-Type: Application/json

Body

DefinedReportSubscriptionModel

In the table below are the defined_report_id values and their corresponding titles required to subscribe to a predefined periodic report.

ReportModel

Value of defined_report_id

Periodic Report Type

5

System report

6

Account access report

7

Safe access report

8

Server access report

9

Session approvals by user

10

Session sharing invites by user

11

Session summary

12

Sessions by server report

13

User access report

14

User activity report

15

User privilege report

16

User report

Note

You can also check the list of available defined report ID’s using the GET /api/v2/report/defined endpoint.

Example Request

POST /api/v2/report/subscription

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/report/subscription' \
  -d'{"period":"day","defined_report_id":"6"}'

Response

{
    "defined_report_subscription": {
        "id": "9124292845052624899"
    },
    "result": "success"
}

Create New Report Definition (Custom Filter)

This endpoint allows defining a new periodic report based on custom filtering parameters. The defined report is visible in the Sessions view under the Custom filters list and can later be used to create a report subscription.

Request

Method

POST

Path

/api/v2/report/defined

Headers

Content-Type: Application/json

Body

DefinedReportModel

Example Request

POST /api/v2/report/defined

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/report/defined' \
  -d'{
     "title": "TestingAAA",
     "type": "system",
             "query_filter": "created_at.ge(2025-12-09T12%3A00%3A51.564Z),created_at.le(2026-01-10T12%3A00%3A51.564Z),subprotocol.iin(rdp),user_id.in(1224979098644774913),retention_locked,!finished_at.isnull(),status.iin(approved)",
             "query_order": "!finished_at"
  }'

Response

{
    "defined_report": {
        "id": "9124292845052624900"
    },
    "result": "success"
}

Note

For details about filtering, see Parameters.

Generate User Report on Demand

A report can be generated on demand for a specific subset of sessions, defined by filtering parameters.

Note

You can also check the list of available defined report ID’s using the GET /api/v2/report/defined endpoint.

Request

Method

POST

Path

/api/v2/report

Headers

Content-Type: Application/json

Body

ReportModel

Example Request

POST /api/v2/report

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/report' \
  -d'{"criteria":[{"field":"protocol","value":"ssh"},{"field":"user","value":"5620492334958379010"}]}'

Response

{
    "report": {
        "id": "5620492334958379016"
    },
    "result": "success"
}

Update Report Definition (Custom Filter)

Request

Method

PATCH

Path

/api/v2/report/defined/<id>

Headers

Content-Type: Application/json

Body

DefinedReportModel

Example Request

PATCH /api/v2/report/defined/<id>

curl -s -k -X PATCH \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/report/defined/9124292845052624900' \
  -d'{
             "title":"Updated Custom Report",
             "query_filter":"created_at.ge(2025-12-09T12%3A00%3A51.564Z),created_at.le(2026-01-10T12%3A00%3A51.564Z),subprotocol.iin(rdp),user_id.in(1224979098644774913),retention_locked,!finished_at.isnull(),status.iin(approved)",
             "query_order": "!finished_at"
     }'

Response

{
    "result": "success"
}

Delete Generated User Report

Request

Method

DELETE

Path

/api/v2/report/<id>

Example Request

DELETE /api/v2/report/<id>

curl -s -k -X DELETE \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/report/9124292845052624902'

Response

{
    "result": "success"
}

Delete Report Definition (Custom Filter)

Request

Method

DELETE

Path

/api/v2/report/defined/<id>

Example Request

DELETE /api/v2/report/defined/<id>

curl -s -k -X DELETE \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/report/defined/9124292845052624900'

Response

{
    "result": "success"
}

Unsubscribe from a Recurring Report

Request

Method

DELETE

Path

/api/v2/report/subscription/<id>

Example Request

DELETE /api/v2/report/subscription/<id>

curl -s -k -X DELETE \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/report/subscription/9124292845052624902'

Response

{
    "result": "success"
}