locationmgm

Locations- Location Management

There is no provision to create or edit locations in Guest Manager. Locations are defined in the Wireless Manager server. Guest Manager auto syncs the location with Mojo wireless Manager Server.  Location tree comprises of location folder and location floor. Location folders represent organizational components such as buildings, cities, or countries. Location floors represent component details such as a floor in a building. Widgets and charts on Dashboard and Analytics display data depending on the selected location. Operations like generating reports are also location specific.

JSON Table

Parameter Data Type Description Default/Sample Value
success boolean Whether the API call was successful or not.  location
message String A message indicating the API success or failure.  Record(s) Found
data application/json A JSON object for the response data.
data/location_tree application/json A JSON object for each node in the location tree.
data/location_tree/name String Name of the node in the location tree. This parameter is also available on the child node. DocTeam
data/location_tree/children application/json A JSON object for each child node.
data/location_tree/children/isFolder boolean Whether the child node is a folder. This is applicable only for nodes that have the node_type set to location.  false
data/location_tree/children/isFloor boolean Whether the child node is a floor. This is applicable only for nodes that have the node_type set to location.  true
data/location_tree/children/hostname String The IP address or host name of the server. This is applicable only for nodes that have the node_type set to server.  mwm-pv.dt.airtightnw.com
data/location_tree/children/timezone String The timezone of the location. This is applicable only for nodes that have the node_type set to location.  Asia/Kolkata
data/location_tree/server_id int The server ID. for root node this is set to null.  1
data/location_tree/location_id int The ID of the location  2
data/location_tree/node_type String The node type. The applicable values are root, server, and location.  server

Copy Sample JSON
Sample JSON
{
    "success": true,
    "message": "Record(s) Found",
    "data": {
        "location_tree": {
            "name": "DocTeam",
            "children": [
                {
                    "name": "mwmpv",
                    "children": [
                        {
                            "name": "customer_009",
                            "children": [
                                {
                                    "name": "Test_Floor",
                                    "children": [],
                                    "isFolder": false,
                                    "isFloor": true,
                                    "server_id": 1,
                                    "location_id": 20,
                                    "node_type": "location",
                                    "timezone": "Asia/Kolkata"
                                }
                            ],
                            "isFolder": false,
                            "isFloor": false,
                            "server_id": 1,
                            "location_id": 12,
                            "node_type": "location",
                            "timezone": "Asia/Kolkata"
                        }
                    ],
                    "server_id": 1,
                    "location_id": 2,
                    "node_type": "server",
                    "hostname": "mwm-pv.dt.airtightnw.com"
                },
                {
                    "name": "Server123",
                    "children": [],
                    "server_id": 3,
                    "location_id": 4,
                    "node_type": "server",
                    "hostname": "192.168.62.180"
                }
            ],
            "server_id": null,
            "location_id": 1,
            "node_type": "root"
        }
    }
}
API Calls

/v1.14/locations

/v1.14/locations/{sid}/{lid}/ssids

Get Locations

Description This API fetches the location tree from Guest Manager.
Guest Manager users with the Administrator role or the Analyst role can access this API.
Syntax
GET <Base_URL>/locations
Sample code
https://analyticsdemo.mojonetworks.com/api/v1.14/locations
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 returns the location tree.

Get SSIDs for a Location

Description This API fetches the list of SSIDs available at a specified location and server.
Guest Manager users with the Administrator role or the Analyst role can access this API.
Syntax
GET <Base_URL>/locations/{sid}/{lid}/ssids?node_type=<value>&src_type=<value>

Here,

  • sid

    It is the server ID for the specified location. It takes an integer value.

  • li

    It is the ID of the location. It takes an integer value.

  • node_type

    It specifies the type of node on the location tree. It takes String value. The applicable values are root, server, and location.

  • src_type

    It is used to filter the SSIDs based on the type of analytic information. It takes String value. The applicable values are social and association.

Sample code
GET https://analyticsdemo.mojonetworks.com/api/v1.14/locations/null/1/ssids?node_type=root&src_type=social
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 returns an array of applicable SSIDs.
A sample response body is as follows:

{
    "success": true,
    "message": "Record(s) Found",
    "data": {
        "ssid_list": [
            "akash",
            "aware_1",
            "e",
            "kudgi123",
            "paidfreepayment",
            "payment",
            "qwerty",
            "Test",
            "test123",
            "trial1"
        ]
    }
}