portal_management

Portal Management

The guest users authenticate into WiFi setup through a portal. The portals can be configured with a combination of plug-ins for authenticating the guests and provide Internet access. Guest Manager provides social media, guest book, click-through, SMS, web form and Radius plugins. These plugins can be enabled and disabled depending on requirement. One must have an administrator role to create and manage portals.

JSON Table

Parameter Data Type Description Default/Sample Value
success boolean Whether the API call was successful or not. true
message String A message indicating the API success or failure. Record Found
data application/json A JSON object for the response data.
data/totalCount int The total number of portals fetched. 1
data/portal application/json A JSON object of the portal created in the customer account.
data/portal/pid int A unique system-generated ID for the portal. 4
data/portal/pname String The name of the portal. default_portal
data/portal/display_name String The display name of the portal. Default Portal
data/portal/uam_secret String The passphrase for secure communication between the portal and the access
point. The same shared secret is configured in the SSID profile in Mojo
Wireless Manager.
32f8e57c
data/portal/session_timeout int The time period, in seconds, after which the guest user session for
the portal expires. The user must re-authenticate with his login credentials
if he wants to continue using the WiFi service. A value of zero indicates
that the user session does not timeout and the user must explicitly log
out from the portal. A non-zero timeout configured on the portal takes
precedence over the timeout configured on the SSID profile in Mojo Wireless
Manager.
data/portal/enable_   logout_popup int Whether the logout popup must be displyed to the guest user. 1 indicates
yes and 0 indicates no.
1
data/portal/date_created Date The date on which the portal was created. 2017-09-11 10:01:52.518933
data/portal/active int Whether the portal is active or inactive. 1 indicates it is active and
0 indicates it is inactive.
1
data/portal/blackout_time int The time period in seconds for which a user cannot log in to the portal
after his last successful login has timed out. A value of zero indicates
no blackout time. The blackout time, including zero value, configured
on the portal takes precedence over the blackout time configured on the
SSID profile in Wireless Manager.
data/portal/landing_url String The URL of the page to which the guest user is redirected to on successful
login from the portal.
data/portal/date_modified Date The date on which the portal details were last modified. null
data/portal/bandwidth_ upload_limit int Maximum upload bandwidth, in Kbps, for the portal.
data/portal/bandwidth_ download_limit int Maximum download bandwidth, in Kbps, for the portal.
data/portal/redirect_url String URL to access the login page for the guest user. https://marketverticalanalytics. airtightnw.com/ redirect/ C8b8a99c88b887e6 eaedae1aef481891e/56a1a6b5b3         cd2704 f22dea907e76236f
data/portal/all_plugins application/json An array of JSON objects for each plug-in available in the customer
account.
data/portal/all_plugins/pgid int The unique ID of the plug-in. 6
data/portal/all_plugins/     display_name String The display name of the plug-in. Google
data/portal/all_operators application/json An array of JSON objects for each operator user created in the customer
account.
data/portal/all_operators/uid int The unique system-generated ID of the operator user.
data/portal/all_operators/ display_name String The display name of the operator user.
data/portal/plugins_selected application/json An array of JSON objects for each plug-in configured on the portal.
data/portal/plugins_selected/pgid int The unique ID of the  plug-in. 5
data/portal/plugins_selected/ display_name String The display name of the plug-in. Clickthrough
data/portal/operators_selected application/json An array of JSON objects for each operator user provided with access
to the portal.
data/portal/operators_selected/uid int The unique system-generated ID of the operator user.
data/portal/operators_selected/ display_name String The display name of the operator user.

Copy Sample JSON
Sample JSON
{
    "success": true,
    "message": "Record Updated",
    "data": {
        "totalCount": 1,
        "portal": {
            "pid": 9,
            "pname": "aware-2017-08-12_19-20-01",
            "display_name": "a-2017-08-12_19-20-01",
            "uam_secret": "a-2017-08-12_16-58-49",
            "enable_logout_popup": 1,
            "date_created": "2017-09-12 11:28:49.094617",
            "active": 1,
            "date_modified": "2018-02-16 15:40:05.946236",
            "campaign_id": 10,
            "sms_service_id": null,
            "skip_splash": 0,
            "skip_splash_timeout": 43200,
            "is_default": 0,
            "payment_service_id": 1,
            "all_plugins": [
                {
                    "pgid": 1,
                    "display_name": "Facebook"
                },
                {
                    "pgid": 2,
                    "display_name": "Twitter"
                },
                {
                    "pgid": 3,
                    "display_name": "LinkedIn"
                },
                {
                    "pgid": 6,
                    "display_name": "Google+"
                },
                {
                    "pgid": 10,
                    "display_name": "Instagram"
                },
                {
                    "pgid": 11,
                    "display_name": "Foursquare"
                },
                {
                    "pgid": 4,
                    "display_name": "Guestbook"
                },
                {
                    "pgid": 12,
                    "display_name": "RADIUS"
                },
                {
                    "pgid": 7,
                    "display_name": "SMS"
                },
                {
                    "pgid": 8,
                    "display_name": "Web Form"
                },
                {
                    "pgid": 5,
                    "display_name": "Clickthrough"
                }
            ],
            "all_operators": [],
            "redirect_url": "https://marketverticalanalytics.airtightnw.com/redirect/C8b8a99c88b887e6eaedae1aef481891e/d03d57ddefbbbe7cf134655f536d6a48",
            "redirect_cdn_url": null,
            "redirect_portalb_url": "https://marketverticalanalytics.airtightnw.com/portalb/C8b8a99c88b887e6eaedae1aef481891e/d03d57ddefbbbe7cf134655f536d6a48/active/",
            "plugins_selected": [
                {
                    "pgid": 1,
                    "display_name": "Facebook"
                },
                {
                    "pgid": 2,
                    "display_name": "Twitter"
                },
                {
                    "pgid": 3,
                    "display_name": "LinkedIn"
                },
                {
                    "pgid": 6,
                    "display_name": "Google+"
                },
                {
                    "pgid": 10,
                    "display_name": "Instagram"
                },
                {
                    "pgid": 11,
                    "display_name": "Foursquare"
                },
                {
                    "pgid": 4,
                    "display_name": "Guestbook"
                },
                {
                    "pgid": 12,
                    "display_name": "RADIUS"
                },
                {
                    "pgid": 7,
                    "display_name": "SMS"
                },
                {
                    "pgid": 8,
                    "display_name": "Web Form"
                },
                {
                    "pgid": 5,
                    "display_name": "Clickthrough"
                }
            ],
            "operators_selected": []
        }
    }
}
API Calls

/v1.14/portals

/v1.14/portals/{portal_id}

/v1.14/portals/plugins

/v1.14/portals/operators

/v1.14/portals/{portal_id}

/v1.14/portals/{pid}

/v1.14/portals/{pid}

/v1.14/portals

/v1.14/portals/{portal_id}

Get Portals

Description The API returns a list of portals defined in the customer account of the logged in Guest Manager user.
Guest Manager users with the Administrator role can access this API.
Syntax
GET <Base_URL>/portals
Sample code
GET https://marketverticalanalytics.airtightnw.com/api/v1.14/portals
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 details of the portal created in the customer account of the logged in user. The response is in the application/json format.

Get Portal

Description The API returns the details of a portal defined in the customer account of the logged in Guest Manager user.
Guest Manager users with the Administrator role can access this API.
Syntax
GET <Base_URL>/portals/{portal_id}

Here,

  • portal_id

    It is the unique system-generated ID of the portal whose details have to be fetched. It takes integer value.

Sample code
GET https://marketverticalanalytics.airtightnw.com/api/v1.14/portals/4
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 details of the portal created in the customer account of the logged in user. The response is in the application/json format.

Get Plugins

Description The API returns a list of plug-ins available in the customer account of the logged in Guest Manager user.
Guest Manager users with the Administrator role can access this API.
Syntax
GET <Base_URL>/portals/plugins
Sample code
GET https://marketverticalanalytics.airtightnw.com/api/v1.14/portals/plugins
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 plug-ins available in the customer account of the logged in user. The response is in the application/json format.

Get Operators

Description The API returns a list of users with the Operator role created in the customer account of the logged in Guest Manager user.
Guest Manager users with the Administrator role can access this API.
Syntax
GET <Base_URL>/portals/operators
Sample code
GET https://marketverticalanalytics.airtightnw.com/api/v1.14/portals/operators
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 users with the operator role created in the customer account of the logged in user. The response is in the application/json format.

Edit Portal

Description The API modifies the settings of a portal in the customer account of the logged in Guest Manager user.Guest Manager users with the Administrator role can access this API.
Syntax
PUT <Base_URL>/portals/{portal_id}

Here,

  • portal_id

    It is the unique system-generated ID of the portal whose details have to be updated.

Sample code
PUT https://marketverticalanalytics.airtightnw.com/api/v1.14/portals/1
Request Body This API call requires the portal settings as parameters in the request body.
The parameters are passed in the application/json format
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the portal created in the customer account of the logged in user. The response is in the application/json format.

Add Portal

Description Guest Manager users with the Administrator role can access this API.
Syntax
POST <Base_URL>/portals
Sample code
POST https://marketverticalanalytics.airtightnw.com/api/v1.14/portals
Request Body This API call requires the portal settings as parameters in the request body.
The parameters are passed in the application/json format
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the portal created in the customer account of the logged in user. The response is in the application/json format.

Delete Portal

Description This API deletes an existing portal from the customer account of the logged in Guest Manager user.
Guest Manager users with the Administrator role can access this API.
Syntax
DELETE <Base_URL>/portals/{portal_id}

Here,

  • portal_id

    It is the unique system-generated ID of the portal that has to be deleted.

Sample code
DELETE https://marketverticalanalytics.airtightnw.com/api/v1.14/portals/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 details of the deleted portal. The response is in the application/json format.

Enable Plugins on Portal

Description This API is used to enable plugins on the specified portal.
Guest Manager users with the Administrator role can access this API.
Syntax
PUT <Base_URL>/portals/{pid}

Here,

  • pid

    It is the unique system generated portal ID. It takes integer value.

Sample code
https://analyticsdemo.mojonetworks.com/api/v1.14/portals/8
Request Body This API call requires the details of the portal along with the list of plugin IDs. To enable the plugins, add the respective plugin IDs to the “plugins_selected” attribute in the request body.

A sample request body is as follows:

  {
	"pname": "aware-2017-08-12_19-20-01",
	"display_name": "a-2017-08-12_19-20-01",
	"uam_secret": "a-2017-08-12_16-58-49",
	"enable_logout_popup": 1,
	"active": 1,
	"sms_service_id": null,
	"skip_splash": 0,
	"skip_splash_timeout": 43200,
	"plugins_selected": [1, 2, 3, 6, 10, 11, 4, 7, 8, 5, 12]
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the list of all the available plugins along with the selected plugins.
The response is in the application/json format.

Disable Plugins on Portal

Description This API is used to disable plugins on the specified portal.
Guest Manager users with the Administrator role can access this API.
Syntax
PUT <Base_URL>/portals/{pid}

Here,

  • pid

    It is the unique system generated portal ID. It takes integer value.

Sample code
https://analyticsdemo.mojonetworks.com/api/v1.14/portals/8
Request Body This API call requires the details of the portal along with the list of plugin IDs. To disable the plugins, remove the respective plugin IDs from the “plugins_selected” attribute in the request body.

A sample request body is as follows:

  {
	"pname": "aware-2017-08-12_19-20-01",
	"display_name": "a-2017-08-12_19-20-01",
	"uam_secret": "a-2017-08-12_16-58-49",
	"enable_logout_popup": 1,
	"active": 1,
	"sms_service_id": null,
	"skip_splash": 0,
	"skip_splash_timeout": 43200,
	"plugins_selected": [1, 2, 3, 6, 10, 11, 4, 7, 8, 5, 12]
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the list of all the available plugins along with the selected plugins.
The response is in the application/json format.