Location
Create
Create Location
POST /api/create-or-update-location
Auth [Identifier], Scope [User]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
location_name | yes | string | ||
address1 | yes | string | ||
town | yes | string | ||
state | yes | string | ||
zipcode | yes | string | ||
country | yes | string | ||
phone_number | yes | string | ||
timezone | yes | string |
Notes:
phone_number
The phone_number format should be (YYY)ZZZ-XXXXcountry
The country code in ISO ALPHA-2 Code (ex. Canada is CA)timezone
The timezone for Toronto is America/Toronto - unicode timezone list: http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
Success [200]
{
"status": "success",
"message": "Location has been successfully created.",
"location_id": [location_id]
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Update
Update Location
POST /api/create-or-update-location
Auth [Identifier], Scope [Location]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
location_id | yes | integer | ||
location_name | yes | string | ||
address1 | yes | string | ||
town | yes | string | ||
state | yes | string | ||
zipcode | yes | string | ||
country | yes | string | ||
phone_number | yes | string | ||
timezone | yes | string |
Notes:
location_id
The location_id must be a Location ID# from the MyWiFi Dashboard if you want to update an existing locationphone_number
The phone_number format should be (YYY)ZZZ-XXXXcountry
The country code in ISO ALPHA-2 Code (ex. Canada is CA)timezone
The timezone for Toronto is America/Toronto - unicode timezone list: http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
Success [200]
{
"status": "success",
"message": "Location has been successfully updated.",
"location_id": [location_id]
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Retrieve
Retrieve data for a Location
GET /api/get-location
Auth [Identifier], Scope [Location]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
location_ids | yes | string |
Notes:
location_ids
The location_ids is either a single location_id integer or a comma separated list of location_ids [maximum 10 location_ids]
Success [200]
{
"status": "success",
"data": [
"id": "[campaign-id]",
"name": "[Location Name]",
"location": "[Lat/Long]",
"address": "[Address]",
"city": "[City]",
"zip": "[Zip]",
"state": "[State]",
"country": "[Country]",
"phone_number": "[Phone Number]",
"url": "[URL]",
"website": "[Website URL]",
"time_zone": "[Time Zone]",
"date_created": "[datetime]",
"last_modified": "[datetime]",
"deleted": "[0|1]"
]
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Delete
Delete Location
POST /api/delete-location
Identifier, Auth[API], Scope [Location]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
location_id | yes | integer |
Notes:
location_id
The location_id must be a Location ID# from the MyWiFi Dashboard
Success [200]
{
"status": "success",
"message": "Location has been successfully deleted."
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Campaign Assign
Assign Default Campaign to Location
POST /api/location-assign-campaign
Auth [Identifier], Scope [Location|Campaign]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
location_id | yes | integer | ||
campaign_id | yes | integer |
Notes:
location_id
The location_id must be a Location ID# from the MyWiFi Dashboard or 0 (to disassociate a Device from any Location set the location_id to 0)
Success [200]
{
"status": "success",
"message": "Campaign has been successfully assigned to Location."
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Device Assign
Assign Device to Location
POST /api/device-assign-location
Auth [Identifier], Scope [Location|Device]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
location_id | yes | integer | ||
device_id | yes | integer |
Notes:
location_id
The location_id must be a Location ID# from the MyWiFi Dashboard or 0 (to disassociate a Device from any Location set the location_id to 0)
Success [200]
{
"status": "success",
"message": "Device has been successfully assigned to Location."
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Devices List
List all Devices assigned to Location
GET /api/get-location-devices
Auth [Identifier], Scope [User]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
identifier | yes | string | ||
location_id | yes | integer |
Success [200]
{
"status": "success",
"devices": [
{
"id": "[device_id]",
"name": "[device name]",
"mac_address": "4c5e0cf192b3",
"model": "[model]",
"status": "[status]",
"live_status": "[live status]",
"firmware_version": [firmware version],
"upgrade": "[upgrade status]",
"sync_response": [sync response],
"status_created_on": [status datetime]
}
]
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Retrieve Session & Bandwidth
Retrieve Location Options / Settings [RADIUS Attributes]
GET /api/get-location-options
Auth [Identifier], Scope [Location]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
location_id | yes | integer |
{
"status": "success",
{ “data”: {
"location_id": "[LocationID]",
"session_time_limit": {
"state": [true|false],
"value": "[seconds]"
},
"daily_bandwidth_cap": {
"state": [true|false],
"value": [bytes]
},
"content_filter": {
"state": [true|false]
},
"bandwidth_throttle_upanddown": {
"state_up": [true|false],
"state_down": [true|false],
"value": {
"up": "[bytes]",
"down": "[bytes]"
}
}
“dns_server_1”:””,
“dns_server_1”:””,
“blacklist”:””,
“whitelist”:””
}
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}
Update Session & Bandwidth
Update Location Options / Settings [RADIUS Attributes]
POST /api/set-session-and-bandwidth-info
Auth [Identifier], Scope [Location]
Params
Name | Required | Type | Default | Comment |
---|---|---|---|---|
location_id | yes | integer | ||
session_time_limit | no | integer | 0 | |
max_bandwidth | no | integer | 0 | |
max_bandwidth_up | no | integer | 0 | |
daily_bandwidth_cap | no | integer | 0 | |
content_filter | no | bool | 0 | true,false |
{
"status": "success",
"message": "Location Session and Bandwidth Info has been set."
}
Error [400]
{
"status": "error",
"message": {
[error_msgs]
}
}