blesetting

BLE Settings

Bluetooth Low Energy (BLE) is used for proximity based services on mobile devices via an application ecosystem. Mojo APs now support the iBeacon BLE standard.

JSON Table

Attribute Data Type Description
policyCreatedAtLocId application/json ID of the location at which the BLE setting has been configured. For
details about the JSON, click Location
Id
.
policyType String A read-only field for internal use.
major int This is a number that identifies a subset of beacons within a large
group defined for a Location in the Mojo Location Hierarchy. Its range
is from 0 – 65535. The default value is 0.
uuid string This identifies the beacon. It is defined for a Location in the Mojo
Location Hierarchy. The default value of the UUID is a pre-defined random
string at the Root location. You can keep this value or generate a new
one.
recursiveApply boolean

Copy Sample JSON
Sample JSON
 {
    "policyCreatedAtLocId": {
        "type": "locallocationid",
        "id": 0
    },
    "policyType": "BLE_SETTINGS",
    "major": 12345,
    "uuid": "01234589-89ab-cdef-0123-456789abcdef",
    "recursiveApply": false
}
API Calls

/V5/policies/blesettings

/V5/policies/blesettings

<Base_URL>/V2/analytics/associationdata/{startdate}/{enddate}

Get BLE Settings

Description This API is used to fetch the BLE settings at a specified location.
Users with the roles can call this API: superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/policies/blesettings
Sample code
GET https://training.mojonetworks.com/new/webservice/V5/policies/
blesettings?locationid=0&nodeid=0
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.

Customize BLE Settings

Description This API is used to customize the BLE settings at a specified location.
Users with the roles can call this API: superuser, administrator, operator, and viewer.
Syntax
PUT <Base_URL>/policies/blesettings
Sample code
PUT https://training.mojonetworks.com/new/webservice/V5/policies/blesettings?
locationid=0&nodeid=0
Request Body You must provide appropriate values for the following attributes.

  • policyCreatedAtLocId
  • policyType
  • uuid
  • recursiveApply
  • major

Sample request body is as follows:

{
    "policyCreatedAtLocId":
	{
        "type": "locallocationid",
        "id": 0
    },
    "policyType": "BLE_SETTINGS",
    "major": 12345, 
    "uuid": "01234589-89ab-cdef-0123-456789abcdef",
    "recursiveApply": true
}
Response Body If the API call is successful, the HTTP response status is 204.
The response body does not contain any other information.

Put APIs

Description This API is used to fetch the APs that match the specified filter criteria from the allowed locations for the logged-in user. If no filters are specified, all the APs from the allowed locations are fetched. However, this API is not supported in a server cluster environment.

Note: Do not use this API to fetch more than 100 devices. For fetching larger number of devices, consider using the Get Paged List of APs API.

User Privileges Users with the following roles can call this API: superuser, administrator, and operator.

Request Body Parameters
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 APs that match the filter criteria. The response is in the application/json format. Click AP to view the complete detais of the JSON along with a sample output.

Error codes
If the API call is successful, the HTTP response status is 200.

Syntax
GET /devices/aps
Sample code
GET https://training.mojonetworks.com/new/webservice/v2/devices/aps
GET
https://training.mojonetworks.com/new/webservice/v2/devices/aps?macaddress=00:11:74:33:23:12&macaddress=00:11:74:45:12:21
GET
https://training.mojonetworks.com/new/webservice/v2/devices/aps?capability=49&locationid=10&locationid=12&sortcolumn=devicename&sortascending=false
URL Parameters This API call takes optional URL parameters to filter the list of APs to be fetched and the column on which the output must be sorted. AP Filter Parameters lists the parmeter names, datatypes, applicable values, and whether the results can be sorted based on the parameter.
Query Parameters This API call takes optional URL parameters to filter the list of APs to be fetched and the column on which the output must be sorted. AP Filter Parameters lists the parmeter names, datatypes, applicable values, and whether the results can be sorted based on the parameter.
Response Body If the API call is successful, the HTTP response status is 200. The response body contains the details of the APs that match the filter criteria. The response is in the application/json format. Click AP to view the complete detais of the JSON along with a sample output.