sitesDevicesOthers := client.SitesDevicesOthers()
SitesDevicesOthers
Count Site OtherDevices Events
CountSiteOtherDeviceEvents(
ctx context.Context,
siteId uuid.UUID,
distinct *models.SiteOtherDeviceEventsCountDistinctEnum,
mType *string,
start *int,
end *int,
duration *string,
limit *int) (
models.ApiResponse[models.RepsonseCount],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
distinct |
*models.SiteOtherDeviceEventsCountDistinctEnum |
Query, Optional | Default: "mac" |
mType |
*string |
Query, Optional | see listDeviceEventsDefinitions |
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 |
duration |
*string |
Query, Optional | duration like 7d, 2w Default: "1d" |
limit |
*int |
Query, Optional | Default: 100 Constraints: >= 0 |
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
distinct := models.SiteOtherDeviceEventsCountDistinctEnum("mac")
duration := "10m"
limit := 100
apiResponse, err := sitesDevicesOthers.CountSiteOtherDeviceEvents(ctx, siteId, &distinct, nil, nil, nil, &duration, &limit)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
{
"distinct": "string",
"end": 0,
"limit": 0,
"results": [
{
"count": 0,
"property": "string"
}
],
"start": 0,
"total": 0
}
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 List of Site other devices (3rd party devices)
ListSiteOtherDevices(
ctx context.Context,
siteId uuid.UUID,
vendor *string,
mac *string,
serial *string,
model *string,
name *string,
limit *int,
page *int) (
models.ApiResponse[[]models.DeviceOther],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
vendor |
*string |
Query, Optional | - |
mac |
*string |
Query, Optional | - |
serial |
*string |
Query, Optional | - |
model |
*string |
Query, Optional | - |
name |
*string |
Query, Optional | - |
limit |
*int |
Query, Optional | Default: 100 Constraints: >= 0 |
page |
*int |
Query, Optional | Default: 1 Constraints: >= 1 |
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
limit := 100
page := 1
apiResponse, err := sitesDevicesOthers.ListSiteOtherDevices(ctx, siteId, nil, nil, nil, nil, nil, &limit, &page)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
[
{
"created_time": 1676983730,
"device_mac": "001122334455",
"id": "ae9dee49-69e7-4710-a114-5b827a777738",
"mac": "5c5b35000018",
"model": "AP41",
"modified_time": 1676983730,
"name": "hallway",
"org_id": "2818e386-8dec-2562-9ede-5b8a0fbbdc71",
"serial": "FXLH2015150025",
"site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
"vendor": "cradlepoint"
}
]
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 |
Search Site OtherDevices Events
SearchSiteOtherDeviceEvents(
ctx context.Context,
siteId uuid.UUID,
mac *string,
deviceMac *string,
vendor *string,
mType *string,
start *int,
end *int,
duration *string,
limit *int) (
models.ApiResponse[models.ResponseEventsOtherDevicesSearch],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
siteId |
uuid.UUID |
Template, Required | - |
mac |
*string |
Query, Optional | mac |
deviceMac |
*string |
Query, Optional | mac of attached device |
vendor |
*string |
Query, Optional | vendor name |
mType |
*string |
Query, Optional | see listDeviceEventsDefinitions |
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 |
duration |
*string |
Query, Optional | duration like 7d, 2w Default: "1d" |
limit |
*int |
Query, Optional | Default: 100 Constraints: >= 0 |
models.ResponseEventsOtherDevicesSearch
ctx := context.Background()
siteId := uuid.MustParse("000000ab-00ab-00ab-00ab-0000000000ab")
duration := "10m"
limit := 100
apiResponse, err := sitesDevicesOthers.SearchSiteOtherDeviceEvents(ctx, siteId, nil, nil, nil, nil, nil, nil, &duration, &limit)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
{
"end": 0,
"limit": 0,
"results": {
"device_mac": "string",
"mac": "5c5b351e13b5",
"org_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862a",
"site_id": "4ac1dcf4-9d8b-7211-65c4-057819f0862b",
"text": "Plugged: The Internal 5GB (SIM1) has been inserted into Internal 1.",
"timestamp": 547235620.89,
"type": "CELLULAR_EDGE_MODEM_WAN_PLUGGED",
"vendor": "cradlepoint"
},
"start": 0,
"total": 0
}
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 |