Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

The following section describes the API methods of the WIFI platform referring to the Locations module, which let you to, for example, obtain all the information related to the Locations or WLANs.

Locations

GET - Get Location

Returns all the Locations to which the user has access. If the ID of a particular Location is indicated in the request, this returns all the information related to that Location.

https://<server-domainname>/rest/<version>/Location/{LocationId}

j

Parameters

TYPE

Parameter

Significance

Type

Required

Default

HEAD

Authorization

Bearer <API_KEY>

String

YES


GET

LocationId

Location identifier

String

NO

NULL


Response

HTTP Code

Result

Response data

200

Ok


{
	"data": [{
    "deviceType": "mikrotik",
    "printFormat": "thermal",
    "cacPhone": null,
    "authServer": 1,
    "paypalAccountId": 1,
    "pmsInterfaceId": null,
    "pmsCharges": 0,
    "facebookConfigId": 1,
    "twitterConfigId": 0,
    "linkedinConfigId": 0,
    "instagramConfigId": 0,
    "smsConfigId": null,
    "ticketHeadline": null,
    "realmId": 66,
    "realm": "XXX",
    "coding": "base32pass",
    "id": "02XXX200",
    "name": "WIFI",
    "properties": {
      "usesPasscode": 0,
      "printTickets": 1
    },
    "grantedModules": null,
    "address": "Calle Valentin Beato 22, 28037 Madrid",
    "latLng": "40.4492616,-3.7114444",
    "timezone": "Europe\/Madrid",
    "woeid": null,
    "currency": "eur",
    "isEnabled": 1,
    "avatar": 480,
    "supportCode": null,
    "owner": "XXX",
    "groups": null
  }]
}


401

Unauthorized

Explanation of the error


WLANs

GET - Get WLANs of Location

Returns all the WLANs of the Location specified by the LocationId parameter.

https://<server-domainname>/rest/<version>/Location/wlan/{LocationId}


Parameters

TYPE

Parameter

Significance

Type

Required

Default

HEAD

Authorization

Bearer <API_KEY>

String

YES


QUERY

LocationId

Location identifier

String

YES


QUERY

offset


integer

NO


QUERY

limit


integer

NO


QUERY

rows


integer

NO


QUERY

page


integer

NO


QUERY

current_page


integer

NO



Response

HTTP Code

Result

Response data

200

Ok


[{
	"id": 115,
	"LocationId": "28XXX01",
	"LocationName": "PRUEBAS API",
	"name": "WL0008",
	"ssid": "WLAN_GUEST",
	"desc": "GUEST",
	"status": 1,
	"splashPortalId": 98,
	"avatar": 712,
	"disclaimerId": 2,
	"redirection": "http:\/\/example.com",
	"redirections": {
		"sponsor": null
	},
	"loginMethods": ["sponsor"]
}, {
	"id": 148,
	"LocationId": "28XXX01",
	"LocationName": "PRUEBAS API",
	"name": "WL0009",
	"ssid": "WLAN_STAFF",
	"desc": "STAFF",
	"status": 1,
	"splashPortalId": 67,
	"avatar": 712,
	"disclaimerId": 2,
	"redirection": null,
	"redirections": {
		"general": null
	},
	"loginMethods": ["general"]
}]


401

Unauthorized

Explanation of the error



Locations Groups

GET - Get Location Groups

Returns all the Location groups to which the user has access. If the ID of a specific group is indicated in the request, this returns all the Locations that belong to that group.

https:/<server-domainname>/rest/<version>/Location/groups/{LocationGroupId}


Parameters

TYPE

Parameter

Significance

Type

Required

Default

HEAD

Authorization

Bearer <API_KEY>

String

YES


GET

LocationGroupId

Location identifier

String

NO

NULL


Response

HTTP Code

Result

Response data

200

Ok


{
	"data": [{
    "id": "XXX",
    "name": " XXX ",
    "prefix": " XXX ",
    "owner": 2,
    "properties": null,
    "isSingleSite": 0,
    "avatar": [340],
    "sites": ["28XXX001", "28XXX002"],
    "users": ["11"]
  }]
}


401

Unauthorized

Explanation of the error


If the ID of a particular Location group is sent as parameter, all the Locations included in that group will be obtained.

Response

HTTP Code

Result

Response data

200

Ok


[
    {
        "deviceType": "aerohive",
        "printFormat": "thermal",
        "cacPhone": null,
        "authServer": 1,
        "paypalAccountId": 2,
        "pmsInterfaceId": "1",
        "pmsCharges": 0,
        "facebookConfigId": 2,
        "twitterConfigId": 0,
        "linkedinConfigId": 0,
        "instagramConfigId": 0,
        "smsConfigId": 1,
        "mailConfigId": 4,
        "ticketHeadline": null,
        "realmId": 21,
        "realm": "28XXX004",
        "coding": "passcode",
        "id": "28XXX004",
        "name": "Pruebas API",
        "properties": {
            "emailCredentials": 0,
            "printTickets": 1,
            "usesPasscode": 1,
            "sponsorNotificationChannel": "sms"
        },
        "grantedModules": null,
        "address": "Madrid",
        "latLng": "44.76221,-3.532",
        "timezone": "Europe/Madrid",
        "woeid": null,
        "currency": "eur",
        "isEnabled": 1,
        "avatar": 846,
        "supportCode": null,
        "owner": "XXX",
        "groups": [
              "XXX"
        ],
        "tenant": {
            "id": "1",
            "sitePrefix": "XXX"
        },
        "services": [
            {
                "id": 59219,
                "LocationId": "28XXX004",
                "typeId": "ttf",
                "name": "Ticket - 1h",
                "price": 0,
                "status": 1,
                "onlineTime": 0,
                "expTime": 3600,
                "tpv": 0,
                "pms": 0,
                "showLogin": 1,
                "simDevices": 10,
                "maxUsers": 1,
                "loginMethod": "general",
                "download": 0,
                "upload": 0,
                "downrate": 0,
                "uprate": 0,
                "dailyLimit": 0,
                "validUntil": 15552000,
                "vip": 0,
                "validateEmail": 0,
                "deleted": 0,
                "withRegistration": 0,
                "macCaching": 0,
                "issueOrder": 0,
                "type": {
                    "id": "ttf",
                    "description": "Tiempo corrido",
                    "timetofinish": true,
                    "onlinetime": false,
                    "timetolimit": false,
                    "limittraffic": false
                }
            }
        ],
        "wlans": [
            {
                "id": 428,
                "LocationId": "28XXX004",
                "LocationName": "Location NAME",
                "name": "WL0008",
                "ssid": "WIFI GUEST",
                "desc": "WIFI GUEST",
                "status": 1,
                "splashPortalId": 244,
                "avatar": 846,
                "disclaimerId": 1,
                "redirection": null,
                "redirections": {
                    "general": null
                },
                "loginMethods": [
                    "general"
                ]
            },
        }
        ],
        "devices": [
            {
                "id": 675,
                "deviceType": "aerohive",
                "mac": "4b-3e-01-50-6d-f6",
                "name": "Aerohive AP",
                "LocationId": "28XXX004",
                "status": 1,
                "deleted": 0,
                "macAsCalled": 0,
                "nases": [
                    {
                        "id": 41659,
                        "called": "4b-3e-01-50-6d-f6:WIFI GUEST",
                        "status": 1,
                        "wlanId": 428,
                        "deviceId": 675
                    },
				]
		}]
    }
]


401

Unauthorized

Explanation of the error


Groups of WLANs

GET - Get WLAN Groups

Returns all the WLAN Groups to which the user has access. If the ID of a particular group is indicated, this will return all the WLANs that belong to that group.

https://<server-domainname>/rest/<version>/Location/wlangroups/{wlangroupId}


Parameters

TYPE

Parameter

Significance

Type

Required

Default

HEAD

Authorization

Bearer <API_KEY>

String

YES


GET

wlangroupId

WLAN group identifier

String

NO

NULL

QUERY

offset


integer

NO


QUERY

limit


integer

NO


QUERY

rows


integer

NO


QUERY

page


integer

NO


QUERY

current_page


integer

NO



Response

HTTP Code

Result

Response data

200

Ok


{
    "0": {
        "id": 3,
        "name": "WLAN Group 1",
        "campaign": null,
        "wlans": 2
    },
    "pagination": {
        "offset": 0,
        "limit": 5000,
        "rows": 28,
        "pages": 1,
        "currentPage": 1
    }
}


401

Unauthorized

Explanation of the error


If the ID of a particular WLAN group is sent as a parameter, all the WLANs included in that group would be obtained.

Response:

HTTP Code

Result

Response data

200

Ok


[
    {
        "id": 181,
        "LocationId": "28XXX001",
        "LocationName": "Location NAME",
        "name": "WL001",
        "ssid": "WIFI GUEST",
        "desc": "WIFI GUEST",
        "status": 1,
        "splashPortalId": 62,
        "avatar": 340,
        "disclaimerId": null,
        "redirection": "https://www.example.com"
    },
    {
        "id": 182,
        "LocationId": "28XXX0021",
        "LocationName": "Location NAME",
        "name": "WL002",
        "ssid": "WIFI STAFF",
        "desc": "WIFI STAFF",
        "status": 1,
        "splashPortalId": 62,
        "avatar": 340,
        "disclaimerId": null,
        "redirection": "https://www.example2.com"
    }
]


401

Unauthorized

Explanation of the error

  • No labels