mgm_report_management

Report Management

Mojo guest Manager provides a provision to create custom pdf reports for a location floor. Configuring a Report comprises of various segments. A segment consists of a section, a chart for the selected section, and the duration for which the selected chart is to be populated in the report. The available sections are Dashboard, Demographics, Presence, Engagement, WiFi Usage or Floor Maps. The other filters for the segment such as SSID or time range are made available based on the section selected for a segment. A custom report can contain up to 20 different segments. Report Management feature is available for Guest Manager version 4.2 and above.

JSON Table

Attribute Data Type Description Default/Sample value
success boolean true
message String Record Found
data application/json
data/totalCount int 1
data/reportConfig application/json
data/reportConfig/report_id int 13
data/reportConfig/server_id
data/reportConfig/location_id int 1
data/reportConfig/node_type String root
data/reportConfig/name String pqr
data/reportConfig/schedule_active
data/reportConfig/schedule_email_list
data/reportConfig/schedule_type
data/reportConfig/schedule_frequency_interval
data/reportConfig/schedule_frequency_unit
data/reportConfig/schedule_date_start
data/reportConfig/schedule_date_end
data/reportConfig/schedule_date_next_delivery
data/reportConfig/created_by String Doc team
data/reportConfig/modified_by String Doc team
data/reportConfig/date_modified 2018-02-12 05:48:07.174187
data/reportConfig/date_created 2018-02-12 05:48:07.174187
data/reportConfig/location_path String [\”DocTeam\”]
data/reportConfig/widgets application/json
data/reportConfig/widgets/widget_id String footfall_by_location
data/reportConfig/widgets/category_id String presence
data/reportConfig/widgets/ordering 2
data/reportConfig/widgets/filters application/json
data/reportConfig/widgets/filters/duration_all 30
data/reportConfig/widgets/filters/time_ranges String 11am-1pm
data/reportConfig/widgets/filters/unique_daily_visitor boolean false
data/reportConfig/widgets/reporting_engine_params application/json
data/reportConfig/widgets/reporting_engine_params/data_uri “/api/v1.14/C8b8a99c88b887e6eaedae1aef481891e/analytics/graphs/visitor/location?duration=30&node_type=root&server_id=null&location_id=1”
data/reportConfig/widgets/reporting_engine_params/header_filters application/json
data/reportConfig/widgets/reporting_engine_params/header_filters/name String duration
data/reportConfig/widgets/reporting_engine_params/header_filters//value int 30
data/reportConfig/widgets/reporting_engine_params/header_filters//field
data/reportConfig/widgets/reporting_engine_params/toggle_filters application/json
data/reportConfig/widgets/reporting_engine_params/toggle_filters/name String Unique Daily Visitors
data/reportConfig/widgets/reporting_engine_params/toggle_filters/value boolean false
data/reportConfig/widgets/reporting_engine_params/toggle_filters/field
data/reportConfig/widgets/reporting_engine_params/legend_filters application/json
data/reportConfig/widgets/reporting_engine_params/legend_filters/name String 11am-1pm
data/reportConfig/widgets/reporting_engine_params/legend_filters/value String 11am-1pm
data/reportConfig/widgets/reporting_engine_params/legend_filters/field
data/reportConfig/widgets/location_timezone application/json
data/reportConfig/widgets/location_timezone/name String UTC
data/reportConfig/widgets/location_timezone/offset int +00:00

Copy Sample JSON
Sample JSON
{
    "success": true,
    "message": "Record Found",
    "data": {
        "totalCount": 1,
        "reportConfig": {
            "report_id": 13,
            "server_id": null,
            "location_id": 1,
            "node_type": "root",
            "name": "pqr",
            "schedule_active": null,
            "schedule_email_list": "",
            "schedule_type": null,
            "schedule_frequency_interval": null,
            "schedule_frequency_unit": null,
            "schedule_date_start": null,
            "schedule_date_end": null,
            "schedule_date_next_delivery": null,
            "created_by": "Doc team",
            "modified_by": "Doc team",
            "date_modified": "2018-02-12 05:48:07.174187",
            "date_created": "2018-02-12 05:48:07.174187",
            "location_path": "[\"DocTeam\"]",
            "widgets": [
                {
                    "widget_id": "footfall_by_days",
                    "category_id": "presence",
                    "ordering": 1,
                    "filters": {
                        "duration_all": "7",
                        "time_ranges": "12am-8am",
                        "unique_daily_visitor": "true"
                    },
                    "reporting_engine_params": {
                        "data_uri": "/api/v1.14/C8b8a99c88b887e6eaedae1aef481891e/analytics/graphs/visitor/days?duration=7&node_type=root&server_id=null&location_id=1",
                        "header_filters": [
                            {
                                "name": "duration",
                                "value": "7",
                                "field": null
                            }
                        ],
                        "toggle_filters": [
                            {
                                "name": "Unique Daily Visitors",
                                "value": true,
                                "field": null
                            }
                        ],
                        "legend_filters": {
                            "name": "12am-8am",
                            "value": "12am-8am",
                            "field": null
                        }
                    }
                },
                {
                    "widget_id": "footfall_by_location",
                    "category_id": "presence",
                    "ordering": 2,
                    "filters": {
                        "duration_all": "30",
                        "time_ranges": "11am-1pm",
                        "unique_daily_visitor": "false"
                    },
                    "reporting_engine_params": {
                        "data_uri": "/api/v1.14/C8b8a99c88b887e6eaedae1aef481891e/analytics/graphs/visitor/location?duration=30&node_type=root&server_id=null&location_id=1",
                        "header_filters": [
                            {
                                "name": "duration",
                                "value": "30",
                                "field": null
                            }
                        ],
                        "toggle_filters": [
                            {
                                "name": "Unique Daily Visitors",
                                "value": false,
                                "field": null
                            }
                        ],
                        "legend_filters": {
                            "name": "11am-1pm",
                            "value": "11am-1pm",
                            "field": null
                        }
                    }
                }
            ],
            "location_timezone": {
                "name": "UTC",
                "offset": "+00:00"
            }
        }
    }
}
API Calls

/v1.14/reports/config

/v1.14/reports/config/{config_id}

/v1.14/reports/config

/v1.14/reports/config/{config_id}

/v1.14/reports/config/{config_id}

/v1.14/reports/{config_id}/email

/v1.14/reports/{config_id}/download

Get All Reports

Description The API is used to fetch list of all the available reports with their configuration details.Guest Manager users with the Administrator role can access this API.
Syntax
GET <Base_URL>/reports/config?node_type=<value>&server_id=<value>&location_id=<value>

Here,

  • node_type
  • server_id
  • location_id
Sample code
GET https://analyticsdemo.mojonetworks.com/api/v1.14/reports/options?node_type=root&server_id=null&location_id=1
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the list of all the available reports and their configuration details.

Get Report

Description The API is used to fetch configuration details of the specified report.
Guest Manager users with the Administrator role can access this API.
Syntax
GET <Base_URL>/reports/config/{config_id}?node_type=<value>&server_id=<value>&location_id=<value>

Here,

  • config_id
  • node_type
  • server_id
  • location_id
Sample code
GET https://analyticsdemo.mojonetworks.com/api/v1.14/reports/options?node_type=root&server_id=null&location_id=1
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the configuration details of the specified report.

Add Report

Description This API is used to create a report.
Guest Manager users with the Administrator role can access this API.
Syntax
POST <Base_URL>/reports/config
Sample code
POST https://analyticsdemo.mojonetworks.com/api/v1.14/reports/config
Request Body This API call requires the basic configuration details to create
a report, which are passed as parameters in the request body. The parameters
are passed in the application/json format.A sample request body is as follows:

{
	"name": "abc1",
	"location_id": 1,
	"server_id": null,
	"node_type": "root",
	"widgets": [{
		"ordering": 1,
		"category_id": "dashboard",
		"widget_id": "dashboard-all",
		"filters": {
			"duration_dashboard": "1"
		}
	}]
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the configuration details of the newly created report.

Edit Report

Description This API is used to modify the existing report.
Guest Manager users with the Administrator role can access this API.
Syntax
PUT <Base_URL>/reports/config/{config_id}

Here,

  • config_id
Sample code
https://analyticsdemo.mojonetworks.com/api/v1.14/reports/config/15
Request Body This API call requires the basic details of the report that needs
to be modified, which are passed as parameters in the request body.
The parameters are passed in the application/json format.A sample request body is as follows:

{
	"name": "abc1",
	"location_id": 1,
	"server_id": null,
	"node_type": "root",
	"widgets": [{
		"ordering": 1,
		"category_id": "dashboard",
		"widget_id": "dashboard-all",
		"filters": {
			"duration_dashboard": "1"
		}
	}]
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the configuration details of the modified report.

Delete Report

Description This API is used to delete the existing report.
Guest Manager users with the Administrator role can access this API.
Syntax
DELETE <Base_URL>/reports/config/{config_id}

Here,

  • config_id
Sample code
DELETE https://analyticsdemo.mojonetworks.com/api/v1.14/reports/config/15
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the configuration details of the deleted report.

Email the Report

Description The API is used to email the report to one or more e-mail addresses.
Guest Manager users with the Administrator, Analyst or Marketing Executive role can access this API.
Syntax
GET <Base_URL>/v1.14/reports/{config_id}/email?custom_end_date=<value>&email_list=<value>&task_timeout=<value>

Here,

  • custom_end_date
  • email_list
  • task_timeout
Sample code
GET https://analyticsdemo.mojonetworks.com/api/v1.14/reports/2/email?custom_end_date=2018-02-07&email_list=rasika.ubgade@mojonetworks.com&task_timeout=60
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the success message indicating the email delivery
is scheduled successfully. The parameters are passed in the application/json
format. The following list describes the parameters and the applicable
values:

  • success
  • message
  • data
  • totalCount
  • taskScheduled

A sample response body is as follows:

{
    "success": true,
    "message": "Record(s) Found",
    "data": {
        "totalCount": 1,
        "taskScheduled": true
    }
}

Download the Report

Description The API is used to download the report.
Guest Manager users with the Administrator, Analyst or Marketing Executive role can access this API.
Syntax
GET <Base_URL>/v1.14/reports/{config_id}/download?task_timeout=<value>&error_url=<value>

Here,

  • config_id
  • task_timeout
  • error_url
Sample code
GET https://analyticsdemo.mojonetworks.com/api/v1.14/reports/2/download?task_timeout=60
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
On the successful execution of the call, the report is downloaded on your machine, on the selected location.