cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1135
Views
0
Helpful
7
Replies
Highlighted
Beginner

CMX system settings api

Hi,

I want to retrieve specific CMX system settings with the REST api.
I want to retrieve the filtering Parameters and the Location Setup from the CMX settings.
In the documentation CMX 10-3 & CMX 10-4 there is a documented api to retrieve the system settings:

GET: System Settings Preferences
Description This API retreives system settings. 
HTTP Method GET 
Resource URI /api/config/v1/system/preferences/:component/:key 
Requires OAuth N

However, I cannot find out how to use this documented api and which `:component` values should be used. For instance, I would like to retrieve the Filtering Parameters and Location Setup.
These calls do not work with the on the CMX-sandbox ->

curl -X GET -H "Accept: application/json" -k -u "learning":"learning" "https://cmxlocationsandbox.cisco.com/api/config/v1/system/preferences/filteringParams/"

curl -X GET -H "Accept: application/json" -k -u "learning":"learning" "https://cmxlocationsandbox.cisco.com/api/config/v1/system/preferences/locationsetup/"

Both Return ->

Resource Not Found

However I found out that the a different API (without `system/preferences`) does work:

Filtering Parameter

curl -H "Accept: application/json" -k -u "learning":"learning" "https://cmxlocationsandbox.cisco.com/api/config/v1/filteringParams/-1"

Returns ->

```
{"name":null,"allowedMacs":[],"disallowedMacs":[],"blockedList":[],"noLocationSsids":[],"noAnalyticsSsids":[],"disallowprobingclienttracking":true,"macfilter":false,"ssidfilter":false,"probingrssicutoff":-85,"minapwithvalidrssi":1,"filterLocallyAdministered":true,"objectId":0,"dutyCycleCutoff":0}
```

Location Setup

curl -X GET -H "Accept: application/json" -k -u "learning":"learning" "https://cmxlocationsandbox.cisco.com/api/config/v1/locationsetup/-1

Returns ->

```
{"name":null,"enableHeatMapStore":false,"enableTimeCalc":true,"fastStaleRSSIInMins":2,"staleRSSIInSecs":600,"staleAoAInSecs":180,"useWallsOption":0,"enableOWLoc":true,"publishRawLocation":false,"absRSSICutoffInMins":60,"rssiCutoff":-75,"binSize":8.0,"avgFactor":0.0,"enableLocFiltering":false,"enableChokepointUse":true,"staleChokepointInSecs":60,"interfererMergeAggressiveness":"NORMAL","chokepointFloorDiffUsage":"NEVER","movementIndividualRSSIChangeThreshold":5,"movementAggregatedRSSIChangeThreshold":3,"movementManyNewRSSIPercentThreshold":20,"movementManyMissingRSSIPercentThreshold":20,"mergeIndividualRSSIChangeThreshold":5,"mergeAggregatedRSSIChangeThreshold":3,"mergeManyNewRSSIPercentThreshold":20,"mergeManyMissingRSSIPercentThreshold":20,"useDefaultHeatmapsForNonCiscoAntennas":false,"useNewLocationAlgorithm":true,"debugElementCounts":false,"locComputationType":"default","useTopTen":false,"maxAllowableDiplacementForBeacon":20,"maxInactiveDurationforBeaconInMins":60,"locForceFailed":true,"activeLocationCheck":true,"analyticsDataPipeScan":false,"publishStatsMsgToAnalytics":false,"generateGeoFencingNotifications":false,"rssiCutoffForBeacon":-75,"historyTTL":30,"discardPartialPhaseValues":false,"historyTTLInSeconds":2592000,"importPresenceSites":false,"prevLocCutoffInSecs":30,"minRequiredPruneRssi":1,"dropAnalyticsPacketDurationInMins":-1,"analyticsPacketsScanPolicy":"ALL"}
```

So these `hidden` uri's return exactly the settings we want.

However, how should the documented API `GET: System Settings Preferences` with the uri `/api/config/v1/system/preferences/:component/:key` be used to retrieve the settings for the components `filteringParams` and `locationsetup`?

If that is not possible, is there any documentation or status on stability about these hidden/undocumented api uri's `api/config/v1/filteringParams` and `api/config/v1/locationsetup`?


Best Regards,

Sam

Everyone's tags (4)
7 REPLIES 7
Highlighted
Frequent Contributor

Re: CMX system settings api

Hi,

Regarding system settings, please see the reply atCMX API for CPU,Memory.

I will follow-up soon on on the other questions, soon.

Thanks.

Highlighted
Beginner

Re: CMX system settings api

Hi Matthew,

Thanks for the quick response!

I would like to avoid using hidden Api's in production, since they might be susceptible to backwards compatible changes and lack useful documentation.

Let me know if you have any information on how to use the documented CMX GET: System settings preferences API (e.g. from CMX 10-3 & CMX 10-4  -> /api/config/v1/system/preferences/:component/:key).

Looking forward to the follow-up.

Best Regards,

Sam

Highlighted
Frequent Contributor

Re: CMX system settings api

Hi Sam,

Seems the API /db/metrics/series for CMX 10.4 has changed and returning 401 Unauthorized error.  Also, the mobile app "Cisco CMX" is no longer returning system metrics (cpu, memory, disk).

Regarding system settings preferences, the documentation below is from an internal CMX wiki, and will most likely be provided in the next release notes.

I will see what else I can find out about these resources.

Thanks.


Introduction

Cisco has introduced new CMX device level filters into 10.3 for the purpose of removing transient devices detected in environments such as open outdoor location settings. These filters are designed to remove remote devices and other detected devices that exhibit characteristics that make them unlikely to be devices of interest.

RSSI Cutoff  (default -85 dBm)

This filter is available on the CMX UI via the System - Settings - Filtering selection. It does not affect associated devices. It filters out probe packets coming from devices with an RSSI less than the setting. Recommended setting for an outdoor environment: -75 dBm

Minimum Physical APs Detecting (default=1)

CMX detects devices through the use of probe signals. Information sent to CMX may contain RSSI measurements from a collection of Access Points (AP) detecting the device. An AP is defined by a MAC address.This filter enforces a constraint on the number of unique APs that must detect the device with RSSI greater than the RSSI Cutoff. If the constraint is met CMX consider's the device detected

Minimum RSSI Measurements (default=1)

This constraint is in reference to the minimum number of RSSI measurements required to consider a device detected and compute a location

Map Determination (default=Weighted-RSSI)

Probing devices may be detected by APs belonging to many maps. CMX provides the following methods to determine which map a device will belong to

  1. Weighted-RSSI method: Weighted RSSI measured for APs in a map is summed and compared to the sum of other maps. The map with the greatest sum is determined as the map the device belongs to
  2. Strongest-RSSI method: The map with an AP detecting the strongest RSSI for a probing device is the map chosen

Filter Configuration Instructions

Filter configuration is performed through UI or REST API. Both approaches are persistent and survive restarts of CMX. Configuration applied via REST requires ssh to CMX system as 'cmxadmin' user

RSSI Cutoff

Available on CMX UI: System - Settings - Filtering, set RSSI cutoff

Minimum Physical APs Detecting

Example setting minimum AP to 4:

curl -X POST -H "Content-Type: application/json" -d '{"minapwithvalidrssi":4 }' http://localhost/api/config/v1/filteringParams/1

In CMX 10.4.0, there is a regression bug CSCvh04575 due to which this patch doesn't work. Please contact BU team for a patch.

Minimum RSSI Measurements

Example setting minimum RSSI measurements to 4:

curl -X POST -H "Content-Type: application/json" -d '{"minRequiredPruneRssi":4 }' http://localhost/api/config/v1/locationsetup/1

Map Determination

Example setting strongest AP:

curl -X POST -H "Content-Type: application/json" -d '{"floorDetermineAlgo":"USE_STRONGEST_AP" }' http://localhost/api/config/v1/locationconfig/1

Example setting weighted RSSI:

curl -X POST -H "Content-Type: application/json" -d '{"floorDetermineAlgo":"USE_PURE_WEIGHTED_METRIC" }' http://localhost/api/config/v1/locationconfig/1

View Configurations

To view configurations set perform this command:

curl http://localhost/api/config/v1/filteringParams/1
Highlighted
Beginner

Re: CMX system settings api

Hi Matthew, 

thank you for your response.
These are indeed the system setting preferences I would like to retrieve.
Let me know if you find our more about the documented system settings preferences api or the undocumented one.

Is it possible that the documented system settings preferences api should actually be something like `/api/config/v1/:component/1` and not `/api/config/v1/system/preferences/:component/:key`?

 
Best Regards,
Sam van Leipsig
Highlighted
Frequent Contributor

Re: CMX system settings api

Hi,

I will forward our questions to the CMX engineering team.  The CMX sandbox is scheduled for upgrade to 10.5 this week.  I will test these API resources on 10.5, also.

Thanks.

Highlighted
Beginner

Re: CMX system settings api

Hi Matthew,

 

I saw that the CMX sandbox was updated to 10.5, I tested the system settings preference API resource on the 10.5 sandbox and it is the same as it was on 10.4 (documented version does not work, but hidden api resource does work).

 

Did you get a response from the CMX engineering team?

 

Best Regards,

Sam van Leipsig

 

Highlighted
Beginner

Re: CMX system settings api

Hi Matthew,

 

Any update?

 

Best Regards,

Sam van Leipsig

CreatePlease to create content
Content for Community-Ad
Cisco Community May 2020 Spotlight Award Winners
This widget could not be displayed.