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¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Unique and read-only object Identifier |
|
|
string |
Report title. |
|
|
string |
Defined report identifier. |
|
|
string |
Read-only. Expensive to use. |
|
|
string |
Read-only. Report generated timestamp. |
|
|
string |
Identifier of the user who created the report. |
|
|
string |
Query filter used to create the report. |
|
|
string |
Query order of returned values used to create the report. |
|
|
string |
Read-only. |
|
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only |
Retrieve Available Attributes of the ReportModel¶
Request
Method |
|
Path |
|
Data Structures: DefinedReportSubscriptionModel¶
A report subscription is a configuration that enables automatic generation of a report for a user at defined intervals.
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Unique and read-only report subscription identifier |
|
|
string |
Defined report identifier. |
|
|
string |
Identifier of the user who created the report. Requires |
|
|
string {day, week, month, quarter, year} |
Period of generating reports. |
|
|
string |
Identifier of the user who created the report. |
|
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only |
Retrieve Available Attributes of the DefinedReportSubscriptionModel¶
Request
Method |
|
Path |
|
Data Structures: DefinedReportModel¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Unique and read-only object Identifier |
|
|
string |
Defined report title. |
|
|
string |
Immutable. Defined report type. |
|
|
string |
Query filter used to create the report. |
|
|
string |
Query order of returned values used to create the report. |
|
|
string |
Immutable. Identifier of the user who created the report. |
|
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only |
|
|
boolean |
Read-only; Expensive to use; If |
|
|
boolean |
Read-only; Expensive to use; If |
Retrieve Available Attributes of the DefinedReportModel¶
Request
Method |
|
Path |
|
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
Get List of Generated Reports¶
Request
Method |
|
Path |
|
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 |
|
Path |
|
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 |
|
Path |
|
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 |
|
Path |
|
Path |
|
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 |
|
Path |
|
Headers |
|
Body |
|
In the table below are the defined_report_id values and their corresponding titles required to subscribe to a predefined periodic report.
Value of |
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 |
|
Path |
|
Headers |
|
Body |
|
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 |
|
Path |
|
Headers |
|
Body |
|
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 |
|
Path |
|
Headers |
|
Body |
|
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 |
|
Path |
|
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 |
|
Path |
|
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 |
|
Path |
|
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"
}