sitesLocation := client.SitesLocation()
SitesLocation
- Clear Site Ml Overwrite for Device
- Clear Site Ml Overwrite for Map
- Get Site Beam Coverage Overview
- Get Site Default Plf for Models
- Get Site Machine Learning Current Stat
- Overwrite Site Ml for Device
- Overwrite Site Ml for Map
- Reset Site Ml Stats by Map
Clear ML Overwrite for Device
ClearSiteMlOverwriteForDevice(
ctx context.Context,
siteId uuid.UUID,
deviceId uuid.UUID) (
http.Response,
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
deviceId |
uuid.UUID |
Template, Required | - |
``
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
deviceId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
resp, err := sitesLocation.ClearSiteMlOverwriteForDevice(ctx, siteId, deviceId)
if err != nil {
log.Fatalln(err)
} else {
fmt.Println(resp.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
400 | Bad Syntax | ResponseHttp400Exception |
401 | Unauthorized | ResponseHttp401ErrorException |
403 | Permission Denied | ResponseHttp403ErrorException |
404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | ResponseHttp404Exception |
429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | ResponseHttp429ErrorException |
Clear ML Overwrite for Map
ClearSiteMlOverwriteForMap(
ctx context.Context,
siteId uuid.UUID,
mapId uuid.UUID) (
http.Response,
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
mapId |
uuid.UUID |
Template, Required | - |
``
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
mapId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
resp, err := sitesLocation.ClearSiteMlOverwriteForMap(ctx, siteId, mapId)
if err != nil {
log.Fatalln(err)
} else {
fmt.Println(resp.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
400 | Bad Syntax | ResponseHttp400Exception |
401 | Unauthorized | ResponseHttp401ErrorException |
403 | Permission Denied | ResponseHttp403ErrorException |
404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | ResponseHttp404Exception |
429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | ResponseHttp429ErrorException |
Get Beam Coverage Overview
GetSiteBeamCoverageOverview(
ctx context.Context,
siteId uuid.UUID,
mapId *string,
mType *models.RfClientTypeEnum,
clientType *string,
duration *string,
resolution *models.ResolutionEnum,
start *int,
end *int) (
models.ApiResponse[models.ResponseLocationCoverage],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
mapId |
*string |
Query, Optional | map_id (filter by map_id) |
mType |
*models.RfClientTypeEnum |
Query, Optional | - |
clientType |
*string |
Query, Optional | client_type (as filter. optional) |
duration |
*string |
Query, Optional | duration like 7d, 2w Default: "1d" |
resolution |
*models.ResolutionEnum |
Query, Optional | Default: "default" |
start |
*int |
Query, Optional | start datetime, can be epoch or relative time like -1d, -1w; -1d if not specified |
end |
*int |
Query, Optional | end datetime, can be epoch or relative time like -1d, -2h; now if not specified |
models.ResponseLocationCoverage
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
mapId := "00000000-0000-0000-0000-000000000000"
duration := "10m"
resolution := models.ResolutionEnum("default")
apiResponse, err := sitesLocation.GetSiteBeamCoverageOverview(ctx, siteId, &mapId, nil, nil, &duration, &resolution, nil, nil)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
{
"beams_means": [
[
1,
3,
3.2
],
[
6,
10,
6.5
]
],
"end": 1428954000,
"gridsize": 1,
"result_def": [
"x",
"y",
"beams_mean",
"beacons_mean",
"max_rssi",
"avg_rssi"
],
"results": [
[
1,
3,
3.2,
18.5,
-68,
-70
],
[
6,
10,
6.5,
30,
1,
-72.5,
-75
]
],
"start": 1428939600
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
400 | Bad Syntax | ResponseHttp400Exception |
401 | Unauthorized | ResponseHttp401ErrorException |
403 | Permission Denied | ResponseHttp403ErrorException |
404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | ResponseHttp404Exception |
429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | ResponseHttp429ErrorException |
Get Default PLF for Models
GetSiteDefaultPlfForModels(
ctx context.Context,
siteId uuid.UUID) (
models.ApiResponse[[]interface{}],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
[]interface{}
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
apiResponse, err := sitesLocation.GetSiteDefaultPlfForModels(ctx, siteId)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
[
{
"current": {
"Android": {
"completed": 36,
"int": -6,
"level": 3,
"ple": -3,
"quality": "4",
"src": "device",
"timestamp": 1442854794
},
"iOS": {
"completed": 16,
"int": -6,
"level": 6,
"ple": -3,
"quality": "2",
"src": "default",
"timestamp": 1442854704
},
"iPod": {
"int": -10,
"overwrite": true,
"ple": -5,
"src": "overwrite"
}
},
"device_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
},
{
"beacon_id": "7913f032-aab4-c3ae-e83e-5a2756ef4d40",
"current": {
"iOS": {
"completed": 16,
"int": -6,
"level": 6,
"ple": -3,
"quality": "last",
"src": "device",
"timestamp": 1442854704
}
}
}
]
HTTP Status Code | Error Description | Exception Class |
---|---|---|
400 | Bad Syntax | ResponseHttp400Exception |
401 | Unauthorized | ResponseHttp401ErrorException |
403 | Permission Denied | ResponseHttp403ErrorException |
404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | ResponseHttp404Exception |
429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | ResponseHttp429ErrorException |
Get Machine Learning Current Stat For each VBLE AP, it has ML model parameters (e.g. Path-loss-estimate, Intercept) as well as completion indicators (Level and PercentageComplete). For the completeness, ML takes N sample to finish its first level and use N*0.25 samples to complete each successive level. When a device is moved, the completeness will be reset as it has to re-learn.
GetSiteMachineLearningCurrentStat(
ctx context.Context,
siteId uuid.UUID,
mapId *string) (
models.ApiResponse[[]interface{}],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
mapId |
*string |
Query, Optional | map_id (as filter, optional) |
[]interface{}
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
mapId := "00000000-0000-0000-0000-000000000000"
apiResponse, err := sitesLocation.GetSiteMachineLearningCurrentStat(ctx, siteId, &mapId)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
[
{
"current": {
"Android": {
"completed": 36,
"int": -6,
"level": 3,
"ple": -3,
"quality": "4",
"src": "device",
"timestamp": 1442854794
},
"iOS": {
"completed": 16,
"int": -6,
"level": 6,
"ple": -3,
"quality": "2",
"src": "default",
"timestamp": 1442854704
},
"iPod": {
"int": -10,
"overwrite": true,
"ple": -5,
"src": "overwrite"
}
},
"device_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
},
{
"beacon_id": "7913f032-aab4-c3ae-e83e-5a2756ef4d40",
"current": {
"iOS": {
"completed": 16,
"int": -6,
"level": 6,
"ple": -3,
"quality": "last",
"src": "device",
"timestamp": 1442854704
}
}
}
]
HTTP Status Code | Error Description | Exception Class |
---|---|---|
400 | Bad Syntax | ResponseHttp400Exception |
401 | Unauthorized | ResponseHttp401ErrorException |
403 | Permission Denied | ResponseHttp403ErrorException |
404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | ResponseHttp404Exception |
429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | ResponseHttp429ErrorException |
Overwrite ML For Device
OverwriteSiteMlForDevice(
ctx context.Context,
siteId uuid.UUID,
deviceId uuid.UUID,
body map[string]models.MlOverwriteAdditionalProperties) (
models.ApiResponse[[]interface{}],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
deviceId |
uuid.UUID |
Template, Required | - |
body |
map[string]models.MlOverwriteAdditionalProperties |
Body, Optional | Request Body |
[]interface{}
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
deviceId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
body := map[string]models.MlOverwriteAdditionalProperties{
"iOS": models.MlOverwriteAdditionalProperties{
Int: models.ToPointer(6),
Ple: models.ToPointer(-3),
},
"iPod": models.MlOverwriteAdditionalProperties{
Int: models.ToPointer(-10),
Ple: models.ToPointer(-5),
},
}
apiResponse, err := sitesLocation.OverwriteSiteMlForDevice(ctx, siteId, deviceId, body)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
[
{
"current": {
"Android": {
"completed": 36,
"int": -6,
"level": 3,
"ple": -3,
"quality": "4",
"src": "device",
"timestamp": 1442854794
},
"iOS": {
"completed": 16,
"int": -6,
"level": 6,
"ple": -3,
"quality": "2",
"src": "default",
"timestamp": 1442854704
},
"iPod": {
"int": -10,
"overwrite": true,
"ple": -5,
"src": "overwrite"
}
},
"device_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
},
{
"beacon_id": "7913f032-aab4-c3ae-e83e-5a2756ef4d40",
"current": {
"iOS": {
"completed": 16,
"int": -6,
"level": 6,
"ple": -3,
"quality": "last",
"src": "device",
"timestamp": 1442854704
}
}
}
]
HTTP Status Code | Error Description | Exception Class |
---|---|---|
400 | Bad Syntax | ResponseHttp400Exception |
401 | Unauthorized | ResponseHttp401ErrorException |
403 | Permission Denied | ResponseHttp403ErrorException |
404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | ResponseHttp404Exception |
429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | ResponseHttp429ErrorException |
Overwrite ML For Map
OverwriteSiteMlForMap(
ctx context.Context,
siteId uuid.UUID,
mapId uuid.UUID,
body map[string]models.MlOverwriteAdditionalProperties) (
models.ApiResponse[[]interface{}],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
mapId |
uuid.UUID |
Template, Required | - |
body |
map[string]models.MlOverwriteAdditionalProperties |
Body, Optional | Request Body |
[]interface{}
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
mapId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
body := map[string]models.MlOverwriteAdditionalProperties{
"iOS": models.MlOverwriteAdditionalProperties{
Int: models.ToPointer(6),
Ple: models.ToPointer(-3),
},
"iPod": models.MlOverwriteAdditionalProperties{
Int: models.ToPointer(-10),
Ple: models.ToPointer(-5),
},
}
apiResponse, err := sitesLocation.OverwriteSiteMlForMap(ctx, siteId, mapId, body)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
[
{
"current": {
"Android": {
"completed": 36,
"int": -6,
"level": 3,
"ple": -3,
"quality": "4",
"src": "device",
"timestamp": 1442854794
},
"iOS": {
"completed": 16,
"int": -6,
"level": 6,
"ple": -3,
"quality": "2",
"src": "default",
"timestamp": 1442854704
},
"iPod": {
"int": -10,
"overwrite": true,
"ple": -5,
"src": "overwrite"
}
},
"device_id": "b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
},
{
"beacon_id": "7913f032-aab4-c3ae-e83e-5a2756ef4d40",
"current": {
"iOS": {
"completed": 16,
"int": -6,
"level": 6,
"ple": -3,
"quality": "last",
"src": "device",
"timestamp": 1442854704
}
}
}
]
HTTP Status Code | Error Description | Exception Class |
---|---|---|
400 | Bad Syntax | ResponseHttp400Exception |
401 | Unauthorized | ResponseHttp401ErrorException |
403 | Permission Denied | ResponseHttp403ErrorException |
404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | ResponseHttp404Exception |
429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | ResponseHttp429ErrorException |
Reset ML Stats by Map
ResetSiteMlStatsByMap(
ctx context.Context,
siteId uuid.UUID,
mapId uuid.UUID) (
http.Response,
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
mapId |
uuid.UUID |
Template, Required | - |
``
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
mapId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
resp, err := sitesLocation.ResetSiteMlStatsByMap(ctx, siteId, mapId)
if err != nil {
log.Fatalln(err)
} else {
fmt.Println(resp.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
400 | Bad Syntax | ResponseHttp400Exception |
401 | Unauthorized | ResponseHttp401ErrorException |
403 | Permission Denied | ResponseHttp403ErrorException |
404 | Not found. The API endpoint doesn’t exist or resource doesn’ t exist | ResponseHttp404Exception |
429 | Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold | ResponseHttp429ErrorException |