Get Advanced Analytics Data
These endpoints return the results for the Advanced Analytics reports and widgets specific to the Personal, Group, or Netskope Library.
The token should be passed to every REST API call for the tenant. We recommend that you place the token in the body of the request, not in the endpoint URL.
REQUEST ENDPOINT
https://<tenant-name>.goskope.com/api/v1/all_reports
This endpoint returns information about Reports for the account and related information as follows:
{ "report_id": "5", "report_name": "MallaTestDashboard", "folder_id": "88", "folder_name": "old", "folder_type": "shared" }
The purpose of the 'all_reports' API is to get the Report Name, Report ID, and Folder ID for an account and use this information to pass to following APIs:
https://<tenant-name>.goskope.com/api/v1/widgets_in_reports
https://<tenant-name>.goskope.com/api/v1/report_widget_data
RESPONSE
Sample URL: https://<tenant-name>.goskope.com/api/v1/all_reports?
Sample Output:
{ "status": "success", "msg": "", "data": [ { "report_id": 4692, "report_name": "Ved Group Report 3", "folder_id": 291, "folder_name": "Personal", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 158 }, { "report_id": 4721, "report_name": "Cloud Risk Assessment Copy 3", "folder_id": 40, "folder_name": "developer.vbox", "folder_type": "group", "user": "developer@netskope.com", "user_id": 158 }, { "report_id": 4738, "report_name": "Cloud Risk Assessment REST", "folder_id": 311, "folder_name": "Personal", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 171 }, { "report_id": 4739, "report_name": "Cloud Risk Assessment Group", "folder_id": 40, "folder_name": "developer.vbox", "folder_type": "group", "user": "developer@netskope.com", "user_id": 171 }, { "report_id": 4820, "report_name": "sub personal", "folder_id": 428, "folder_name": "sub personal", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 171 }, { "report_id": 4821, "report_name": "sub personal Copy", "folder_id": 311, "folder_name": "Personal", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 171 }, { "report_id": 4822, "report_name": "sub group", "folder_id": 404, "folder_name": "sub group 1", "folder_type": "group", "user": "developer@netskope.com", "user_id": 171 }, { "report_id": 4823, "report_name": "group", "folder_id": 40, "folder_name": "developer.vbox", "folder_type": "group", "user": "developer@netskope.com", "user_id": 171 }, { "report_id": 4829, "report_name": "Web Exec Dashboard Personal", "folder_id": 311, "folder_name": "Personal", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 171 } ] }
REQUEST ENDPOINT
https://<tenant-name>.goskope.com/api/v1/widgets_in_report
This endpoint returns all the widgets present inside a report. It includes following:
Report information
Number of Widgets
Widget Information
Key | Value | Description |
---|---|---|
token | string | The token obtained from the REST API page in the Netskope UI ( Settings > Tools > Rest API v1) is required. We recommend that you place the token in the body of the request, not in the endpoint URL. |
report_id | positive integer | The report_id is derived from the following API:
If report_id is passed, folder_id is not mandatory. |
report_name | URL encoded string | The report_name is derived from the following API:
If report_name is passed, folder_id is mandatory. |
folder_id | positive Integer | The folder_id for a report is derived from the following API:
|
Either the report_id or report_name must be present.
RESPONSE
Sample URLs:
(report_id only)
https://<tenant-name>.goskope.com/api/v1/widgets_in_report?report_id=4829
(report_name with folder_id)
https://<tenant-name>.goskope.com/api/v1/widgets_in_report?folder_id=311&report_name=Web%20Exec%20Dashboard%20Personal
Sample Output:
{ "status": "success", "msg": "", "data": { "report": { "report_name": "Web Exec Dashboard Personal", "report_id": "4829", "folder": "Personal: developer@netskope.com", "folder_id": "311" }, "widget_count": 8, "widgets": [ { "widget_name": "Alerts - #Anomalies_ChangePrevPeriod", "widget_id": "29468", "folder": "Personal: developer@netskope.com", "folder_id": "311", "type": "query" }, { "widget_name": "Alerts - #PolicyAlerts_ChangePrevPeriod", "widget_id": "29469", "folder": "Personal: developer@netskope.com", "folder_id": "311", "type": "query" }, { "widget_name": "Top Site Categories by Bytes", "widget_id": "29470", "folder": "Personal: developer@netskope.com", "folder_id": "311", "type": "query" }, { "widget_name": "Top Sites by Bytes", "widget_id": "29471", "folder": "Personal: developer@netskope.com", "folder_id": "311", "type": "query" }, { "widget_name": "Alerts - #Events_ChangePrevPeriod", "widget_id": "29472", "folder": "Personal: developer@netskope.com", "folder_id": "311", "type": "query" }, { "widget_name": "% of Sites Allowed/Blocked For Blocked Categories", "widget_id": "29473", "folder": "Personal: developer@netskope.com", "folder_id": "311", "type": "merge_query", "info": "Can not be used for CSV export." }, { "widget_name": "Alerts - #MalaciousAlerts_ChangePrevPeriod", "widget_id": "29474", "folder": "Personal: developer@netskope.com", "folder_id": "311", "type": "query" }, { "widget_name": "#Malicious Sites by Category", "widget_id": "29475", "folder": "Personal: developer@netskope.com", "folder_id": "311", "type": "query" } ] } }
REQUEST ENDPOINT
https://<tenant-name>.goskope.com/api/v1/report_widget_data
This endpoint returns information for a widget present in a report in CSV and JSON format. The row limit in the returned data is 10000.
Key | Value | Description |
---|---|---|
token | string | The token obtained from the REST API page in the Netskope UI ( Settings > Tools > Rest API v1) is required. We recommend that you place the token in the body of the request, not in the endpoint URL. |
report_id | positive integer | The report_id is derived from the following API:
If report_id is passed, folder_id is not mandatory. |
report_name | URL encoded string | The report_name is derived from the following API:
If report_name is passed, folder_id is mandatory. |
widget_id | positive integer | The widget_id is derived from the following API:
|
widget_name | URL encoded string | The widget_name is derived from the following API:
|
folder_id | positive integer | The folder_id for a report is derived from the following API:
|
result_format | csv | json | result format (default: csv) |
Either the report_id or report_name must be present.
Either the widget_id or widget_name must be present.
RESPONSE
Sample URLs:
(report_id only with widget_id)
https://<tenant-name>.goskope.com/api/v1/report_widget_data?report_id=4829&widget_id=29472
(report_id only with widget_name)
https://<tenant-name>.goskope.com/api/v1/report_widget_data?report_id=4829&widget_name=Alerts%20-%20%23Events_ChangePrevPeriod
(report_name with folder_id and widget_id)
https://<tenant-name>.goskope.com/api/v1/report_widget_data?report_name=Web%20Exec%20Dashboard%20Personal&widget_id=29472
(report_name with folder_id and widget_name)
https://<tenant-name>.goskope.com/api/v1/widgets_in_report?folder_id=311&report_name=Web%20Exec%20Dashboard%20Personal
Sample Output:
Álerts # Events,Diff_Prev_Period , "1,546",-28% "2,138",
REQUEST ENDPOINT
https://<tenant-name>.goskope.com/api/v1/all_widgets
This endpoint returns information about Reports for the account and related information as follows:
Sample Output:
{ "widget_id": 11, "widget_name": "AE_AppCategoryCounts", "folder_id": "88", "folder_name": "old", "folder_type": "shared" }
The purpose of the 'all_widgets' API is to get the Widget Name, Widget ID, and Folder ID and pass it to the following API:
https://<tenant-name>.goskope.com/api/v1/widget_data
RESPONSE
Sample URL:
https://<tenant-name>.goskope.com/api/v1/all_widgets
Sample Output:
{ "status": "success", "msg": "", "data": [ { "widget_id": 480, "widget_name": "Total Bytes 2 Copy", "folder_id": 291, "folder_name": "Personal", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 158 }, { "widget_id": 483, "widget_name": "test 1", "folder_id": 291, "folder_name": "Personal", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 158 }, { "widget_id": 486, "widget_name": "Total Bytes from Personal", "folder_id": 40, "folder_name": "developer.vbox", "folder_type": "group", "user": "developer@netskope.com", "user_id": 158 }, { "widget_id": 489, "widget_name": "DLP Alerts by User Copy", "folder_id": 417, "folder_name": "test 5", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 158 }, { "widget_id": 491, "widget_name": "Total Bytes 2 Copy 1", "folder_id": 416, "folder_name": "test2", "folder_type": "group", "user": "developer@netskope.com", "user_id": 158 }, { "widget_id": 492, "widget_name": "Total Bytes 2 Copy 1 Copy", "folder_id": 407, "folder_name": "test 3", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 158 }, { "widget_id": 494, "widget_name": "Users Copy", "folder_id": 403, "folder_name": "test 2", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 158 }, { "widget_id": 510, "widget_name": "Cloud Services by CCL", "folder_id": 311, "folder_name": "Personal", "folder_type": "personal", "user": "developer@netskope.com", "user_id": 171 } ] }
REQUEST ENDPOINT
https://<tenant-name>.goskope.com/api/v1/widget_data
This endpoint returns information for a widget in CSV and JSON format. The row limit in the returned data is 10000.
Key | Value | Description |
---|---|---|
token | string | The token obtained from the REST API page in the Netskope UI ( Settings > Tools > Rest API v1) is required. We recommend that you place the token in the body of the request, not in the endpoint URL. |
widget_id | positive integer | The widget_id is derived from the following API:
|
widget_name | URL encoded string | The widget_name is derived from the following API:
|
folder_id | positive integer | The folder_id for a report is derived from the following API:
|
result_format | csv | json | result format (default: csv) |
Either widget_id or widget_name must be present.
RESPONSE
Sample URLs:
(widget_id only)
https://<tenant-name>.goskope.com/api/v1/widget_data?widget_id=358
(widget_name with folder_id)
https://<tenant-name>.goskope.com/api/v1/widget_data?folder_id=18&;widget_name=User%20Country%20to%20Application%20to%20Destination%20Country
Sample Output:
Page Events Source Country,Page Events Application,Page Events Destination Country,Page Events Sum - Total Bytes India,Microsoft Teams,United States,"1,286,251,749" United States,Microsoft Teams,United States,"707,971,524" United States,Microsoft Office 365 OneDrive for Business,United States,"97,959,531" United Kingdom,Microsoft Teams,United States,"49,265,051" Canada,Microsoft Teams,United States,"44,885,701" United States,Microsoft Office 365 Admin,United States,"39,012,590" United States,Microsoft Office 365 Outlook.com,United States,"12,070,289" United States,Microsoft Office 365 Sharepoint Online,United States,"2,972,378" United States,Microsoft Yammer,United States,"2,586,132" India,Microsoft Office 365 Admin,United States,"2,079,168" United States,G Suite,United States,"581,583" United Kingdom,Microsoft Office 365 Outlook.com,United States,"505,919" United States,Microsoft Office 365 Suite,United States,"455,489" United States,Microsoft Office 365 Sharepoint Admin,United States,"445,634"