Configuration

Notification subscription API

GET: All Notification Subscriptions

Description

This API returns all notification subscriptions.

HTTP Method

GET

Resource URI

/api/config/v1/notifications

Requires OAuth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

[
    {
        "name": "operational-insights-tag",
        "userId": "admin",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "locationupdate.deviceType == tag"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "https://opinsights.cisco.com:443/api/am/v1/events",
                        "messageFormat": "JSON",
                        "headers": {
                            "Authorization": "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRJZCI6NCwibG9jYXRpb25FbmdpbmUiOjEsImlhdCI6MTUxMTkwOTkzMSwiYXVkIjoiTm90aWZpY2F0aW9uIiwianRpIjoiNjkzMzI0MzZjM2NlMTM4Zjc4ZWRiMzQ5OWI3NmRhZjVhYTVhOGM0NS00LTEifQ.VNWG1XCcMcbLFIDRqPnwtfcA8v2qTdiWbWaRPcNXno4"
                        },
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": true,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "LocationUpdate"
    },
    {
        "name": "gateway-blemgmtadmin-feedback-io89bg",
        "userId": "local-user",
        "rules": [
            {
                "conditions": []
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "https://ce2rfd8puk.execute-api.us-west-2.amazonaws.com:443/stage/listener/5f5967a8-a0df-4674-92d5-86510ce72cc3?cmxidentifier=a1991c30-8cfd-11e7-b51c-bb23d688f84b",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": true,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "LodestarConfigUpdate"
    },
    {
        "name": "gateway-blemanager.cmxcis.co-feedback-io89bg",
        "userId": "local-user",
        "rules": [
            {
                "conditions": []
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "https://io89bg.cmxcis.co:443/api/vble/v1/beacon/xy?jwttoken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0ZW5hbnRJZCI6ImlvODliZyJ9.09iVoaTFI7NdIUwHq2ULbZ6lGUD9zU0J9gBBAmYdNJg",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": true,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "LodestarConfigUpdate"
    },
    {
        "name": "Harvey Updates",
        "userId": "admin",
        "rules": [
            {
                "conditions": []
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "http://54.203.15.211:9094/api/v1/notify",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": false,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "LocationUpdate"
    },
    {
        "name": "gateway-blemanager.cmxcis.co-mapChange-io89bg",
        "userId": "local-user",
        "rules": [
            {
                "conditions": []
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "https://io89bg.cmxcis.co:443/api/vble/v1/beacon/xy?jwttoken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0ZW5hbnRJZCI6ImlvODliZyJ9.09iVoaTFI7NdIUwHq2ULbZ6lGUD9zU0J9gBBAmYdNJg",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": true,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "NetworkDesignChanged"
    },
    {
        "name": "CMX_Api_Server_Notification_1",
        "userId": "admin",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "locationupdate.deviceType == client"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "http://127.0.0.1:9094/api/notify/v1/location",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "LocationUpdate"
    },
    {
        "name": "Nbound Notification",
        "userId": "admin",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "locationupdate.deviceType == client"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "https://data.cmxappsandbox.com:443/api/sdk/v1/notifications",
                        "messageFormat": "JSON",
                        "headers": {
                            "x-jwt-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRpZCI6MTUsInRlbmFudElkIjoxNX0.2S28kXWDSg-GPNfpTxYCKuI_ZnvHLR0oN9XLl9DaRm4",
                            "Content-Type": "application/json"
                        },
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": false,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "secret",
        "notificationType": "LocationUpdate"
    },
    {
        "name": "gateway-blemgmtadmin-bleinfo-io89bg",
        "userId": "local-user",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "bletagupdate.isBle == true"
                    },
                    {
                        "condition": "bletagupdate.deviceType == tag"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "https://ce2rfd8puk.execute-api.us-west-2.amazonaws.com:443/stage/listener/5f5967a8-a0df-4674-92d5-86510ce72cc3?cmxidentifier=a1991c30-8cfd-11e7-b51c-bb23d688f84b",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": true,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "BleTagUpdate"
    },
    {
        "name": "gateway-blemgmtadmin-mapChange-io89bg",
        "userId": "local-user",
        "rules": [
            {
                "conditions": []
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "https://ce2rfd8puk.execute-api.us-west-2.amazonaws.com:443/stage/listener/5f5967a8-a0df-4674-92d5-86510ce72cc3?cmxidentifier=a1991c30-8cfd-11e7-b51c-bb23d688f84b",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": true,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "NetworkDesignChanged"
    },
    {
        "name": "gateway-blemanager.cmxcis.co-bleinfo-io89bg",
        "userId": "local-user",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "bletagupdate.isBle == true"
                    },
                    {
                        "condition": "bletagupdate.deviceType == tag"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "https://io89bg.cmxcis.co:443/api/vble/v1/beacon/xy?jwttoken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0ZW5hbnRJZCI6ImlvODliZyJ9.09iVoaTFI7NdIUwHq2ULbZ6lGUD9zU0J9gBBAmYdNJg",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": true,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "BleTagUpdate"
    },
    {
        "name": "CMX_Api_Server_Notification_2",
        "userId": "admin",
        "rules": [
            {
                "conditions": []
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "http://127.0.0.1:9094/api/notify/v1/absence",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": true,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "Absence"
    },
    {
        "name": "PythonAW",
        "userId": "admin",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "locationupdate.macAddressList == 98:07:2d:8d:75:e8;"
                    },
                    {
                        "condition": "locationupdate.deviceType == tag"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "http://dsladden.pythonanywhere.com:80",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": false,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "LocationUpdate"
    },
    {
        "name": "PythonAWN",
        "userId": "admin",
        "rules": [
            {
                "conditions": []
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "http://taibrahi.pythonanywhere.com:80",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": false,
        "internal": false,
        "cloud": false,
        "enableMacScrambling": true,
        "macScramblingSalt": "",
        "notificationType": "NetworkDesignChanged"
    },
    {
        "name": "HeaderDone",
        "userId": "admin",
        "rules": [
            {
                "conditions": []
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "http://10.41.32.235:8000",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": false,
        "internal": false,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "LocationUpdate"
    }
]

GET: Notifications by Name

Description

This API returns a notification subscription by name.

HTTP Method

GET

Resource URI

/api/config/v1/notifications/:name

Requires OAuth

N

Parameters

Table 1. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Notification Name.

Content Type

application/json

GET: Notification Subscription Availability

Description

This API checks if a notification subscription exiets. It returns FOUND(302) if exists, 404 is not found.

HTTP Method

GET

Resource URI

/api/config/v1/notifications/exists/:name

Requires OAuth

N

Parameters

Table 2. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Notification Name.

Content Type

application/json

PUT: Add Notification Subscription

Description

This API allows you to add a notification subscription.

HTTP Method

PUT

Resource URI

/api/config/v1/notification

Requires OAuth

N

Parameters

Table 3. Parameter Details

Name

Required

Default

Type

Location

Description

userId

Y

string

body

User ID.

rules

Y

text

body

List of rules.

subscribers

Y

text

body

Subscribers

notificationType

Y

enumerated

body

Choose one of the following notification types:

  • Any

  • Absence

  • AreaChange

  • Association

  • BatteryLife

  • Chokepoint

  • Containment

  • Emergency

  • Movement

  • Presence

  • LocationUpdate

  • Zone

  • Location

  • ServiceStatus

  • NetworkDesignChanged

  • CpuUsage

  • MemoryUsage

  • DiskUsage

  • BeaconMovement

  • BeaconAbsence

  • Update

  • InOut

  • PasserbyDetected

  • PasserbyBecameVisitor

  • VisitorWentAway

  • SiteEntryChanged

enabled

N

enumerated

body

enabled

  • true

  • false

enableMacScrambling

N

enumerated

body

enableMacScrambling

  • true

  • false

Content Type

application/json

Sample Input (JSON)

application/json

 {
        "name": "locupdate",
        "userId": "admin",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "locationupdate.macAddressList == 00:0c:cc:4f:5f:ba;00:24:d7:37:68:d8;00:24:d7:59:8f:2c;00:0b:6b:a8:56:9f;"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "http://172.19.35.203:7123",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": false,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "notificationType": "LocationUpdate"
    }

DELETE: Notification Subscription by Notification Name

Description

This API allows you to delete a notification subscription.

HTTP Method

DELETE

Resource URI

/api/config/v1/notifications/:name

Requires OAuth

N

Parameters

Table 4. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Notification Name.

Content Type

application/json

GET: System Alert Subscription

Description

This API returns a system alert notification subscription by name.

HTTP Method

GET

Resource URI

/api/config/v1/notifications/alerts

Requires OAuth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

[
    {
        "name": "serviceIsCrashed",
        "userId": "admin",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "servicestatus.status == CRASHED"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "local://local",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": false,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "severity": "Critical",
        "notificationType": "ServiceStatus"
    },
    {
        "name": "serviceIsDown",
        "userId": "admin",
        "rules": [
            {
                "conditions": [
                    {
                        "condition": "servicestatus.status == STOPPED"
                    }
                ]
            }
        ],
        "subscribers": [
            {
                "receivers": [
                    {
                        "uri": "local://local",
                        "messageFormat": "JSON",
                        "headers": null,
                        "qos": "AT_MOST_ONCE"
                    }
                ]
            }
        ],
        "enabled": true,
        "internal": false,
        "cloud": false,
        "enableMacScrambling": false,
        "macScramblingSalt": "",
        "severity": "Info",
        "notificationType": "ServiceStatus"
    }
]

GET: Notifications by Name

Description

This API returns a system alert notification subscription by name.

HTTP Method

GET

Resource URI

/api/config/v1/notifications/alerts/:name

Requires OAuth

N

Parameters

Table 5. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Notification Name.

Content Type

application/json

PUT: System Alert Subscription

Description

This API allows you to add a system alert subscription.

HTTP Method

PUT

Resource URI

/api/config/v1/notifications/alert

Requires OAuth

N

Parameters

Table 6. Parameter Details

Name

Required

Default

Type

Location

Description

severity

Y

enumerated

body

Choose one of the following severity levels:

  • Critical

  • Major

  • Minor

  • Warning

  • Info

  • Cleared

userId

Y

string

body

User ID.

rules

Y

text

body

List of rules.

subscribers

Y

text

body

Subscribers

notificationType

Y

enumerated

body

Choose one of the following notification types:

  • Any

  • Absence

  • AreaChange

  • Association

  • BatteryLife

  • Chokepoint

  • Containment

  • Emergency

  • Movement

  • Presence

  • LocationUpdate

  • Zone

  • Location

  • ServiceStatus

  • NetworkDesignChanged

  • CpuUsage

  • MemoryUsage

  • DiskUsage

  • BeaconMovement

  • BeaconAbsence

  • Update

  • InOut

  • PasserbyDetected

  • PasserbyBecameVisitor

  • VisitorWentAway

  • SiteEntryChanged

enabled

N

enumerated

body

enabled

  • true

  • false

enableMacScrambling

N

enumerated

body

enableMacScrambling

  • true

  • false

Content Type

application/json

DELETE: Notification Alert Subscription

Description

This API allows you to delete a system alert notification subscription.

HTTP Method

DELETE

Resource URI

/api/config/v1/notifications/alerts/:name

Requires OAuth

N

Parameters

Table 7. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Notification Name.

Content Type

application/json

POST: Change status of notification by name

Description

This API enables or disables a notification subscription by name.

HTTP Method

POST

Resource URI

/api/config/v1/notifications/:name/:user

Requires Basic Auth

N

Parameters

Table 8. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Notification Name

user

Y

String

pathReplace

Name of Notification Owner

action

Y

String

pathReplace

Enable/Disable

Content Type

application/json

API History

Table 9. API History

Release

Modification

Cisco CMX Release 10.4

This API is introduced.

POST: Change Status of Notification by Name

Description

This API enable/disable a notification subscription by name.

HTTP Method

POST

Resource URI

/api/config/v1/notifications/:name/:action

Requires OAuth

N

Parameters

Table 10. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Notification Name.

action

Y

String

pathReplace

Enable/Disable

Content Type

application/json

Users API

GET: All Users in the System

Description

This API gets the details of all users in the system.

HTTP Method

GET

Resource URI

/api/config/v1/aaa/users

Requires Basic Auth

N

Parameters

None.

Content Type

application/json

Sample Output

[
    {
        "id": 1,
        "username": "admin",
        "password": "*****",
        "firstname": "Admin",
        "lastname": "User",
        "userGroups": [],
        "roles": [
            {
                "id": 9,
                "name": "Admin",
                "privileges": []
            }
        ],
        "developerkey": "xjPksHwUQm6bUdITCymREKaoShqB2HPQ",
        "lastlogin": 1519852131789
    }
]

GET: User by Username

Description

This API retrives user by username.

HTTP Method

GET

Resource URI

/api/config/v1/aaa/users/:username

Requires Basic Auth

N

Parameters

Table 11. Parameter Details

Name

Required

Default

Type

Location

Description

username

Y

String

pathReplace

Username

Content Type

application/json

Sample Output (JSON)

10.30.114.188/api/config/v1/aaa/users/admin

{
    "id": 102,
    "username": "mika",
    "password": "*****",
    "firstname": "mika",
    "lastname": "mika",
    "userGroups": [],
    "roles": [
        {
            "id": 5,
            "name": "Read Only",
            "privileges": []
        }
    ],
    "developerkey": null,
    "lastlogin": 1507596970322
}

GET: All Roles

Description

This API gets all roles.

HTTP Method

GET

Resource URI

/api/config/v1/aaa/roles

Requires Basic Auth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

[
    {
        "id": 1,
        "name": "System",
        "privileges": []
    },
    {
        "id": 2,
        "name": "Manage",
        "privileges": []
    },
    {
        "id": 3,
        "name": "Analytics",
        "privileges": []
    },
    {
        "id": 4,
        "name": "Connect",
        "privileges": []
    },
    {
        "id": 7,
        "name": "Location",
        "privileges": []
    },
    {
        "id": 8,
        "name": "ConnectExperience",
        "privileges": []
    },
    {
        "id": 9,
        "name": "Admin",
        "privileges": []
    },
    {
        "id": 5,
        "name": "Read Only",
        "privileges": []
    }
]

GET: Generate Password for User

Description

HTTP Method

GET

Resource URI

/api/config/v1/aaa/genpassword

Requires Basic Auth

N

Parameters

None.

Content Type

application/json

Sample Output

{
    "generatedPwd": "Qakzw&1uxrwreknu"
}

GET: Check for Password expiry

Description

This API checks for password expiry

HTTP Method

GET

Resource URI

/api/config/v1/aaa/evalpassword

Requires Basic Auth

N

Parameters

None.

Content Type

application/json

Sample Output

{
    "isPasswordExpired": "no"
}

API History

Table 12. API History

Release

Modification

Cisco CMX Release 10.5

This API is introduced.

GET: Get User Information

Description

This API enables you to retrieve user information from the CMX system.

HTTP Method

GET

Resource URI

/api/config/v1/aaa/getuser/:username

Requires OAuth

N

Parameters

Table 13. Parameter Details

Name

Required

Default

Type

Location

Description

username

Y

String

pathReplace

Username of user

Content Type

application/json

API History

Table 14. API History

Release

Modification

Cisco CMX Release 10.6

This API is introduced.

Opt In Client API

GET: List of Opt-In devices

Description

HTTP Method

GET

Resource URI

/api/config/v1/optInClientParams/:clusterId

Requires Basic Auth

N

Parameters

Table 15. Parameter Details

Name

Required

Default

Type

Location

Description

clusterId

Y

1

String

pathReplace

clusterId (default 1)

Content Type

application/json

API History

Table 16. API History

Release

Modification

Cisco CMX Release 10.5

This API is introduced.

GET: Hashed MAC for a Given Real Macaddress

Description

This API returns the hashed MAC for a given real macaddress.

HTTP Method

GET

Resource URI

/api/config/v1/optInClientParams/:clusterId/hash

Requires Basic Auth

N

Parameters

Table 17. Parameter Details

Name

Required

Default

Type

Location

Description

clusterId

Y

1

String

pathReplace

clusterId (default 1)

realMac

Y

String

query

Real macaddress

Content Type

application/json

API History

Table 18. API History

Release

Modification

Cisco CMX Release 10.5

This API is introduced.

POST: Update AnalyticsOptIn for Client Device(s) in the Opt-In list.

Description

This API would update the AnalyticsOptIn for client device(s) in the Opt-In list.

HTTP Method

POST

Resource URI

/api/config/v1/optInClientParams/:clusterId/update

Requires OAuth

N

Parameters

Table 19. Parameter Details

Name

Required

Default

Type

Location

Description

clusterId

Y

1

String

pathReplace

clusterId (default 1)

macaddresses

Y

array

body

List of real macaddresses separated by comma.

Ensure macaddresses are nested within the square brackets [ ] to be considered as list, otherwise this operation would fail

OptInClient

N

array

body

List of OptInClient. When macaddresses are specified, OptInClient list is optional

Ensure OptInClient are nested within the square brackets [ ] to be considered as list, otherwise this operation would fail

for e.g. [{"macaddress": "aa:bb:cc:dd:ee:f1","analyticsOptIn": true}, {"macaddress": "aa:bb:cc:dd:ee:ff", "analyticsOptIn": true}]

Content Type

application/json

API History

Table 20. API History

Release

Modification

Cisco CMX Release 10.6

This API is introduced.

POST: Add client device(s) to Opt-In List

Description

You can add devices by either specifying macaddresses or OptInClients. When both are specified, API would give preference to macaddresses. When all the Location and Analytics tracked devices are same, input the macaddresses. When some of the Location devices have not given consent for Analytics tracking, then input them through the OptInClients.It performs an append operation i.e. adding given devices to the existing Opt-In list.

HTTP Method

POST

Resource URI

/api/config/v1/optInClientParams/:clusterId

Requires Basic Auth

N

Parameters

Table 21. Parameter Details

Name

Required

Default

Type

Location

Description

clusterId

Y

1

String

pathReplace

clusterId (default 1)

macaddresses

Y

array

body

List of real macaddresses separated by comma. Ensure macaddresses are nested within the square brackets [ ] to be considered as list, otherwise this operation would fail

OptInClient

N

array

body

List of OptInClient. When macaddresses are specified, OptInClient list is optional

Ensure OptInClient are nested within the square brackets [ ] to be considered as list, otherwise this operation would fail

for e.g. [{"macaddress": "aa:bb:cc:dd:ee:f1","analyticsOptIn": true}, {"macaddress": "aa:bb:cc:dd:ee:ff", "analyticsOptIn": true}]

Content Type

application/json

API History

Table 22. API History

Release

Modification

Cisco CMX Release 10.5

This API is introduced.

DELETE: Delete Client Devices from Opt-In List

Description

This API enables you to delete the client device(s) from the Opt-In list.

HTTP Method

DELETE

Resource URI

/api/config/v1/optInClientParams/:clusterId/delete

Requires OAuth

N

Parameters

Table 23. Parameter Details

Name

Required

Default

Type

Location

Description

clusterId

Y

1

String

pathReplace

clusterId (default 1)

devices

Y

String

query

Single or Comma Separated list of real mac addresses

Content Type

application/json

API History

Table 24. API History

Release

Modification

Cisco CMX Release 10.6

This API is introduced.

DELETE: Remove all Opt-In Devices

Description

This API removes all Opt-In devices.

HTTP Method

DELETE

Resource URI

/api/config/v1/optInClientParams/:clusterId/deleteAll

Requires OAuth

N

Parameters

Table 25. Parameter Details

Name

Required

Default

Type

Location

Description

clusterId

Y

1

String

pathReplace

clusterId (default 1)

Content Type

application/json

API History

Table 26. API History

Release

Modification

Cisco CMX Release 10.6

This API is introduced.

Map resources API

GET: Count of All Map Elements

Description

This API provides count of campuses, buildings, and floors.

HTTP Method

GET

Resource URI

/api/config/v1/maps/count

Requires OAuth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

{
    "totalCampuses": 2,
    "totalBuildings": 3,
    "totalFloors": 8,
    "totalAps": 158,
    "campusCounts": [
        {
            "campusName": "Nortech Campus",
            "totalBuildings": 1,
            "buildingCounts": [
                {
                    "buildingName": "Nortech-1",
                    "totalFloors": 1,
                    "floorCounts": [
                        {
                            "floorName": "1st Floor",
                            "apCount": 14
                        }
                    ]
                }
            ]
        },
        {
            "campusName": "System Campus",
            "totalBuildings": 2,
            "buildingCounts": [
                {
                    "buildingName": "SJC23",
                    "totalFloors": 3,
                    "floorCounts": [
                        {
                            "floorName": "1st floor (CCW remodel)",
                            "apCount": 25
                        },
                        {
                            "floorName": "2nd floor (CCW remodel)",
                            "apCount": 25
                        },
                        {
                            "floorName": "3rd floor (CCW remodel)",
                            "apCount": 24
                        }
                    ]
                },
                {
                    "buildingName": "SJC24",
                    "totalFloors": 4,
                    "floorCounts": [
                        {
                            "floorName": "2nd floor (CCW remodel)",
                            "apCount": 21
                        },
                        {
                            "floorName": "2nd floor (Area Addition)",
                            "apCount": 0
                        },
                        {
                            "floorName": "3rd floor (CCW remodel)",
                            "apCount": 24
                        },
                        {
                            "floorName": "1st floor (CCW remodel)",
                            "apCount": 25
                        }
                    ]
                }
            ]
        }
    ]
}

GET: List of all Building Names.

Description

This API provides a list of all buildings.

HTTP Method

GET

Resource URI

/api/config/v1/maps/building/list/:name

Requires Basic Auth

N

Parameters

Table 27. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Campus Name

Content Type

application/json

API History

Table 28. API History

Release

Modification

Cisco CMX Release 10.4

This API is introduced.

GET: List of all Building Names

Description

This API provides a list of all buildings.

HTTP Method

GET

Resource URI

/api/config/v1/maps/building/list

Requires Basic Auth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

[
    "Nortech Campus>Nortech-1",
    "System Campus>SJC24",
    "System Campus>SJC23"
]

API History

Table 29. API History

Release

Modification

Cisco CMX Release 10.4

This API is introduced.

GET: List of all Floor Names

Description

This API provides a list of all Floors in the system.

HTTP Method

GET

Resource URI

/api/config/v1/maps/floor/list/:name

Requires Basic Auth

N

Parameters

Table 30. Parameter Details

Name

Required

Default

Type

Location

Description

name

Y

String

pathReplace

Building Name

Content Type

application/json

API History

Table 31. API History

Release

Modification

Cisco CMX Release 10.4

This API is introduced.

GET: List of all Floor Names

Description

This API provides a list of all floors in the system.

HTTP Method

GET

Resource URI

/api/config/v1/maps/floor/list

Requires Basic Auth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

[
    "System Campus>SJC23>3rd floor (CCW remodel)",
    "System Campus>SJC23>2nd floor (CCW remodel)",
    "Nortech Campus>Nortech-1>1st Floor",
    "System Campus>SJC23>1st floor (CCW remodel)",
    "System Campus>SJC24>2nd floor (CCW remodel)",
    "System Campus>SJC24>3rd floor (CCW remodel)",
    "System Campus>SJC24>2nd floor (Area Addition)",
    "System Campus>SJC24>1st floor (CCW remodel)"
]

API History

Table 32. API History

Release

Modification

Cisco CMX Release 10.4

This API is introduced.

GET: All Maps

Description

This API returns all maps.

HTTP Method

GET

Resource URI

/api/config/v1/maps

Requires OAuth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)


{
    "version": 0,
    "campuses": [
        {
            "objectVersion": 0,
            "name": "System Campus",
            "dimension": {
                "length": 99999,
                "width": 99999,
                "height": 99999,
                "offsetX": 0,
                "offsetY": 0,
                "unit": "FEET"
            },
            "image": null,
            "buildingList": [
                {
                    "aesUid": -6105692415270583000,
                    "objectVersion": 0,
                    "name": "SJC23",
                    "dimension": {
                        "length": 300,
                        "width": 500,
                        "height": 10,
                        "offsetX": 0,
                        "offsetY": 0,
                        "unit": "FEET"
                    },
                    "image": null,
                    "floorList": [
                        {
                            "aesUid": -5970502993869536000,
                            "calibrationModelId": -5970502993867530000,
                            "objectVersion": 0,
                            "name": "1st floor (CCW remodel)",
                            "dimension": {
                                "length": 249.9,
                                "width": 299.9,
                                "height": 10,
                                "offsetX": 0,
                                "offsetY": 0,
                                "unit": "FEET"
                            },
                            "isOutdoor": false,
                            "floorNumber": 1,
                            "image": {
                                "imageName": "cadConversion_1463400556649_f.jpg",
                                "zoomLevel": 5,
                                "width": 3276,
                                "height": 2715,
                                "size": 3276,
                                "maxResolution": 16,
                                "colorDepth": 8
                            },
                            "gpsMarkers": null,
                            "zones": null,
                            "obstacles": [
                                {
                                    "type": "THICK_WALL",
                                    "attenuation": 0,
                                    "obstacleCoordinates": [
                                        {
                                            "x": 2.0488472,
                                            "y": 3.2261696,
                                            "z": 0,
                                            "unit": "FEET"
                                        },
                                        {
                                            "x": 2.561059,
                                            "y": 236.22719,
                                            "z": 0,
                                            "unit": "FEET"
                                        }
                                    ]
                                },
                                {
                                    "type": "NORMAL_WALL",
                                    "attenuation": 0,
                                    "obstacleCoordinates": [
                                        {
                                            "x": 91.68591,
                                            "y": 233.66675,
                                            "z": 0,
                                            "unit": "FEET"
                                        },
                                        {
                                            "x": 93.73476,
                                            "y": 212.15895,
                                            "z": 0,
                                            "unit": "FEET"
                                        }
                                    ]
                                }
                            ],
                            "accessPoints": [
                                {
                                    "floorId": -5970502993869536000,
                                    "angle": 1.57,
                                    "apType": 2,
                                    "switchName": null,
                                    "name": "sjc23-11-cap1",
                                    "radioMacAddress": "00:42:68:a2:2a:80",
                                    "ethMacAddress": null,
                                    "ipAddress": null,
                                    "numOfSlots": 2,
                                    "mapCoordinates": {
                                        "x": 12.216251,
                                        "y": 13.826434,
                                        "z": 10,
                                        "unit": "FEET"
                                    },
                                    "apMode": "LOCAL",
                                    "apInterfaces": [
                                        {
                                            "band": "IEEE_802_11_B",
                                            "slotNumber": 0,
                                            "channelAssignment": 1,
                                            "channelNumber": 1,
                                            "txPowerLevel": 8,
                                            "antennaPattern": "Internal-3700-2.4GHz",
                                            "antennaAngle": 1.5707964,
                                            "antennaElevAngle": 0,
                                            "antennaGain": 8,
                                            "antennaDiversity": 3,
                                            "antennaMode": 1,
                                            "antennaType": 1,
                                            "txPowerControl": 1,
                                            "unit": "RADIAN",
                                            "dualBandSlot": false
                                        },
                                        {
                                            "band": "IEEE_802_11_A",
                                            "slotNumber": 1,
                                            "channelAssignment": 1,
                                            "channelNumber": 36,
                                            "txPowerLevel": 3,
                                            "antennaPattern": "Internal-3700-5GHz",
                                            "antennaAngle": 1.5707964,
                                            "antennaElevAngle": 0,
                                            "antennaGain": 8,
                                            "antennaDiversity": 3,
                                            "antennaMode": 1,
                                            "antennaType": 1,
                                            "txPowerControl": 1,
                                            "unit": "RADIAN",
                                            "dualBandSlot": false
                                        }
                                    ],
                                    "floorIdString": "-5970502993869536658",
                                    "geoCoordinate": null,
                                    "deviceDetails": null
                                },
                                {
                                    "floorId": -5970502993869536000,
                                    "angle": 1.57,
                                    "apType": 2,
                                    "switchName": null,
                                    "name": "sjc23-11-cap10",
                                    "radioMacAddress": "00:42:68:ae:2c:20",
                                    "ethMacAddress": null,
                                    "ipAddress": null,
                                    "numOfSlots": 2,
                                    "mapCoordinates": {
                                        "x": 22.229992,
                                        "y": 100.062416,
                                        "z": 10,
                                        "unit": "FEET"
                                    },
                                    "apMode": "LOCAL",
                                    "apInterfaces": [
                                        {
                                            "band": "IEEE_802_11_B",
                                            "slotNumber": 0,
                                            "channelAssignment": 1,
                                            "channelNumber": 1,
                                            "txPowerLevel": 8,
                                            "antennaPattern": "Internal-3700-2.4GHz",
                                            "antennaAngle": 1.5707964,
                                            "antennaElevAngle": 0,
                                            "antennaGain": 8,
                                            "antennaDiversity": 3,
                                            "antennaMode": 1,
                                            "antennaType": 1,
                                            "txPowerControl": 1,
                                            "unit": "RADIAN",
                                            "dualBandSlot": false
                                        },
                                        {
                                            "band": "IEEE_802_11_A",
                                            "slotNumber": 1,
                                            "channelAssignment": 1,
                                            "channelNumber": 64,
                                            "txPowerLevel": 4,
                                            "antennaPattern": "Internal-3700-5GHz",
                                            "antennaAngle": 1.5707964,
                                            "antennaElevAngle": 0,
                                            "antennaGain": 8,
                                            "antennaDiversity": 3,
                                            "antennaMode": 1,
                                            "antennaType": 1,
                                            "txPowerControl": 1,
                                            "unit": "RADIAN",
                                            "dualBandSlot": false
                                        }
                                    ],
                                    "floorIdString": "-5970502993869536658",
                                    "geoCoordinate": null,
                                    "deviceDetails": null
                                }
                                    ],
                                    "floorIdString": "-5970502993869536658",
                                    "geoCoordinate": null,
                                    "deviceDetails": null
                                }
                            ],
                            "referenceMarkers": null,
                            "exciters": null,
                            "filterRegions": [
                                {
                                    "regionType": "OUTSIDE",
                                    "regionCoordinates": [
                                        {
                                            "x": 0,
                                            "y": 0,
                                            "z": 0,
                                            "unit": "FEET"
                                        },
                                        {
                                            "x": 299.9,
                                            "y": 0,
                                            "z": 0,
                                            "unit": "FEET"
                                        },
                                        {
                                            "x": 299.9,
                                            "y": 249.9,
                                            "z": 0,
                                            "unit": "FEET"
                                        },
                                        {
                                            "x": 0,
                                            "y": 249.9,
                                            "z": 0,
                                            "unit": "FEET"
                                        }
                                    ],
                                    "isDefault": false
                                }
                            ],
                            "filterRails": null,
                            "hierarchyName": "System Campus>SJC23>1st floor (CCW remodel)",
                            "aesUidString": "-5970502993869536658",
                            "geoLocationCapable": "NO_GPS_MARKERS_PRESENT",
                            "mode": null,
                            "floorModeDetails": {
                                "mode": "RSSI",
                                "requestedModeSet": false
                            }
                        }
            ],
            "aesUid": 727035700041482200,
            "aesUidString": "727035700041482262",
            "members": null
        }
    ]
}

GET: Campus by Name

Description

This API returns a campus by name.

HTTP Method

GET

Resource URI

/api/config/v1/maps/info/:campusName

Requires OAuth

N

Parameters

Table 33. Parameter Details

Name

Required

Default

Type

Location

Description

campusName

Y

String

pathReplace

Campus Name

Content Type

application/json

GET: Building by Name Inside Specific Campus

Description

This API returns a building by name.

HTTP Method

GET

Resource URI

/api/config/v1/maps/info/:campusName/:buildingName

Requires OAuth

N

Parameters

Table 34. Parameter Details

Name

Required

Default

Type

Location

Description

campusName

Y

String

pathReplace

Campus Name.

buildingName

Y

String

pathReplace

Building Name.

Content Type

application/json

GET: Floor Inside Specific Building and Specific Campus

Description

This API returns a floor by name based on a specific building and campus.

HTTP Method

GET

Resource URI

/api/config/v1/maps/info/:campusName/:buildingName/:floorName

Requires OAuth

N

Parameters

Table 35. Parameter Details

Name

Required

Default

Type

Location

Description

campusName

Y

String

pathReplace

Campus Name.

buildingName

Y

String

pathReplace

Building Name.

floorName

Y

String

pathReplace

Floor Name.

Content Type

application/json

GET: Floor Image

Description

This API returns an image for a given combination of campus, building, and floor name.

HTTP Method

GET

Resource URI

/api/config/v1/maps/image/:campusName/:buildingName/:floorName

Requires Basic Auth

N

Parameters

Table 36. Parameter Details

Name

Required

Default

Type

Location

Description

campusName

Y

String

pathReplace

Campus Name.

buildingName

Y

String

pathReplace

Building Name.

floorName

Y

String

pathReplace

Floor Name.

Content Type

application/json

GET: Image by Name

Description

This API returns an image by image name.

HTTP Method

GET

Resource URI

/api/config/v1/maps/imagesource/:imageName

Requires OAuth

N

Parameters

Table 37. Parameter Details

Name

Required

Default

Type

Location

Description

imageName

Y

String

pathReplace

Image Name.

Content Type

application/json

Zone Count Register API

Sites API

GET: All Sites

Description

This API returns all the presence sites.

HTTP Method

GET

Resource URI

/api/config/v1/sites

Requires OAuth

N

Parameters

None.

Content Type

application/json

Example

[{"changedOn":0,"aesUId":1487056035936,"name":"PSL NOC","description":null,"aps":[],"rssiThresholdLow":-95,"rssiThresholdHigh":-65,"examinePeriod":900000,"minDuration":300000,"tags":null,"apCount":3,"timezone":"Asia/Kolkata","aesUidString":"1487056035936","tagList":null,"address":"Nagpur","latitude":0.0,"longitude":0.0,"applyExclusion":false,"exclusionParams":null,"currentTime":"Feb 28, 2017 3:37:50 PM","objectVersion":0},{"changedOn":0,"aesUId":1487260407843,"name":"NOC","description":null,"aps":[],"rssiThresholdLow":-95,"rssiThresholdHigh":-65,"examinePeriod":900000,"minDuration":300000,"tags":null,"apCount":1,"timezone":"Asia/Kolkata","aesUidString":"1487260407843","tagList":null,"address":"Nagpur","latitude":0.0,"longitude":0.0,"applyExclusion":false,"exclusionParams":null,"currentTime":"Feb 28, 2017 3:37:50 PM","objectVersion":0}]

GET: Site Details by ID or Name

Description

This API returns the presence site for the specified ID or Name.

HTTP Method

GET

Resource URI

/api/config/v1/sites/:id

Requires OAuth

N

Parameters

None.

Content Type

application/json

Alerts API

GET: Count of Active Alerts

Description

This API returns a count of active alerts.

HTTP Method

GET

Resource URI

/api/config/v1/alerts/count

Requires OAuth

N

Parameters

None.

Content Type

application/json

GET: All Alerts

Description

This API returns all active alerts.

HTTP Method

GET

Resource URI

/api/config/v1/alerts

Requires OAuth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

[
  {
    "changedOn": 1490159411911,
    "tenantId": 0,
    "lastNotificationTime": 1490159411918,
    "hashkey": -1446685026,
    "alertType": "NMSP_CONNECTION_STATUS",
    "alertStatus": "Unhandled",
    "severity": "Critical",
    "origin": "cmx-vmdev83 WLC: 10.32.168.50",
    "source": "NMSPLB",
    "alarmDescription": "NMSP connection status is inactive for WLC 10.32.168.50",
    "lastEmail": 0,
    "refId": "NMSPLB"
  }
]

Version API

GET: Current CMX Image Version

Description

This API returns the current version of the CMX Image.

HTTP Method

GET

Resource URI

/api/config/v1/version/image

Requires OAuth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

{
    "cmx_image_version": "CISCO_CMX-10.4.0-93.cmx",
    "cmx_rpm_versions": [
        "cisco_cmx_connect-10.4.0-18",
        "cisco_cmx_wips-10.2.0-96",
        "cisco_cmx-10.4.0-1234"
    ]
}

History alerts API

GET: Unique Alerts by Time Interval

Description

This API returns a list of unique alerts by time interval.

HTTP Method

GET

Resource URI

/api/config/v1/history/alerts/unique

Requires Basic Auth

N

Parameters

Table 38. Parameter Details

Name

Required

Default

Type

Location

Description

startTime

Y

Number

query

Specifies the start time in milliseconds.

endTime

Y

Number

query

Specifies the end time in milliseconds.

Content Type

application/json

Table 39. API History

Release

Modification

Cisco CMX Release 10.4

This command is deprecated.

Northbound notification types and attributes API

GET: Get Supported Northbound Notifications

Description

This API returns all supported northbound notification types and applicable attributes for the notification rules.

HTTP Method

GET

Resource URI

/api/configuration/v1/attributes

Requires OAuth

N

Parameters

None.

Content Type

application/json

Sample Output

{
    "networkdesignchanged": {
        "triggerHeterarchyChanged": {
            "name": "triggerHeterarchyChanged",
            "dataType": "BOOLEAN",
            "needValueCheck": false,
            "evaluateByProvider": false,
            "validValueSet": [],
            "nameSpace": "networkdesignchanged"
        },
        "triggerNetworkDesignChanged": {
            "name": "triggerNetworkDesignChanged",
            "dataType": "BOOLEAN",
            "needValueCheck": false,
            "evaluateByProvider": false,
            "validValueSet": [],
            "nameSpace": "networkdesignchanged"
        }
    },
    "servicestatus": {
        "oldStatus": {
            "name": "oldStatus",
            "dataType": "ENUM",
            "needValueCheck": false,
            "evaluateByProvider": false,
            "validValueSet": [
                "STOPPED",
                "RUNNING",
                "CRASHED",
                "DISABLED"
            ],
            "nameSpace": "servicestatus"
        },
        "status": {
            "name": "status",
            "dataType": "ENUM",
            "needValueCheck": true,
            "evaluateByProvider": true,
            "validValueSet": [
                "STOPPED",
                "RUNNING",
                "CRASHED",
                "DISABLED"
            ],
            "nameSpace": "servicestatus"
        },
        "statusChanged": {
            "name": "statusChanged",
            "dataType": "BOOLEAN",
            "needValueCheck": true,
            "evaluateByProvider": false,
            "validValueSet": [],
            "nameSpace": "servicestatus"
        }
    }
}

Heterarchy API

GET: List of Children Superzone IDs of a Heterarchy Element

Description

The call retrieves children superzone IDs of a heterarchy element and, under them, the AES IDs of the nested children floors. The element is identified by the path of the API call (either the full path or the id of the element- see Add/Update zones or tags for details on obtaining the element id).

HTTP Method

GET

Resource URI

/api/config/v1/heterarchy/:pathSegments/childrenfloors

Requires Basic Auth

N

Parameters

Table 40. Parameter Details

Name

Required

Default

Type

Location

Description

pathSegments

N

String

pathReplace

Full path to the element or element id.

validDate

N

String

query

Show elements valid at given date (yyyy-mm-dd HH:mm:ss) Allowed values/formats: yyyy-mm-dd HH:mm:ss.

level

N

String

query

Level name (SUPERZONE, FLOOR, AP, POI, or ZONE) Allowed values/formats: SUPERZONE FLOOR AP ZONE POI.

Content Type

application/json

API History

Table 41. API History

Release

Modification

Cisco CMX Release 10.4

This API is introduced.

GET: Children Superzone IDs of Hiterarchy Element

Description

The call retrieves children superzone IDs of an heterarchy element and, under them, the counts of all the nested children elements. The element is identified by the path of the API call (either the full path or the ID of the element- see Add/Update zones or tags for details on obtaining the element id). Specifying a level retrieves only children of that level.

HTTP Method

GET

Resource URI

/api/config/v1/heterarchy/:pathSegments/childrencounts

Requires Basic Auth

N

Parameters

Table 42. Parameter Details

Name

Required

Default

Type

Location

Description

pathSegments

N

String

pathReplace

Full path to the element or element ID.

validDate

N

String

query

Show elements valid from given date (yyyy-mm-dd HH:mm:ss) Allowed values/formats: yyyy-mm-dd HH:mm:ss.

level

N

String

query

Level name (SUPERZONE, FLOOR, AP, POI, or ZONE) Allowed values/formats: SUPERZONE FLOOR AP ZONE POI.

Content Type

application/json

API History

Table 43. API History

Release

Modification

Cisco CMX Release 10.4

This API is introduced.

System preferences API

GET: Type of Device

Description

This API gets the type of box.

HTTP Method

GET

Resource URI

/api/config/v1/system/type

Requires Basic Auth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

{
    "num_cpus": 20,
    "box_type": "High-End"
}

API History

Table 44. API History

Release

Modification

Cisco CMX Release 10.4

This API is introduced.

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

Parameters

Table 45. Parameter Details

Name

Required

Default

Type

Location

Description

component

Y

String

pathReplace

The component.

key

N

String

pathReplace

The key to retrieve. If not set, retrieves all keys for the given component.

Content Type

application/json

PUT: System Settings

Description

This API enable you to store system settings. This operation can only be performed by users in the 'Admin' group.

HTTP Method

PUT

Resource URI

/api/config/v1/system/preferences/:component/:key

Requires OAuth

N

Parameters

Table 46. Parameter Details

Name

Required

Default

Type

Location

Description

component

Y

String

pathReplace

The component.

key

Y

String

pathReplace

The key.

String

Y

string

body

Value.

Content Type

application/json

GET: Gets the System Time

Description

HTTP Method

GET

Resource URI

/api/config/v1/system/time

Requires OAuth

N

Parameters

None.

Content Type

application/json

Sample Output (JSON)

{
    "ISO8601Utils": "2017-12-18T08:56:16Z",
    "timeZoneOffset": -28800000,
    "serverTimeUTC": 1513587376429,
    "serverTime": "Mon Dec 18 00:56:16 PST 2017",
    "timeZone": "Pacific Standard Time"
}

APIs for Exporting Large Dataset from CMX Cassandra Database

GET: All Available Files

Description

This API returns the list of all history data export archives that are available for download over HTTP. Note that Cisco CMX automatically deletes exported archives eight days after the date of creation.

HTTP Method

GET

Resource URI

/api/config/v1/historydata/export

Requires OAuth

N

Parameters

None.

Content Type

The response is a JSON and contains the URL of all available files.

Sample Output

application/json. The response contains the following:

  • A timestamp that indicates when the archive was exported.

  • The total size of the file(s) in bytes.

  • A URL (or a list of URLs) which serves the file over HTTP.

The file format is '.tar.gz'. You can untar it to convert it to a raw text file. If the file is greater than 400 MB in size, the response is split into a list of files of 400MB each.

[{
"lastModified": "Fri Jan 12 01:35:20 UTC 2018",
"totalFileSizeInBytes": 22719368,
"fileUrl": [
"https://10.30.114.115/common/data/export/CassandraDataset_1515720916/CassandraDataset_1515720916.tar.gz.aa",
"https://10.30.114.115/common/data/export/CassandraDataset_1515720916/CassandraDataset_1515720916.tar.gz.ab",
"https://10.30.114.115/common/data/export/CassandraDataset_1515720916/CassandraDataset_1515720916.tar.gz.ac"
]
},
{
"lastModified": "Fri Jan 12 01:35:40 UTC 2018",
"totalFileSizeInBytes": 132,
"fileUrl": [
"https://10.30.114.115/common/data/export/CassandraDataset_1515720939/CassandraDataset_1515720939.tar.gz"
]
},
{
"lastModified": "Fri Jan 12 01:35:26 UTC 2018",
"totalFileSizeInBytes": 22719371,
"fileUrl": [
"https://10.30.114.115/common/data/export/CassandraDataset_1515720922/CassandraDataset_1515720922.tar.gz.ab",
"https://10.30.114.115/common/data/export/CassandraDataset_1515720922/CassandraDataset_1515720922.tar.gz.aa",
"https://10.30.114.115/common/data/export/CassandraDataset_1515720922/CassandraDataset_1515720922.tar.gz.ac"
]
},
{
"lastModified": "Fri Jan 12 01:35:45 UTC 2018",
"totalFileSizeInBytes": 132,
"fileUrl": [
"https://10.30.114.115/common/data/export/CassandraDataset_1515720943/CassandraDataset_1515720943.tar.gz"
]
},
{
"lastModified": "Fri Jan 12 01:35:32 UTC 2018",
"totalFileSizeInBytes": 22719368,
"fileUrl": [
"https://10.30.114.115/common/data/export/CassandraDataset_1515720928/CassandraDataset_1515720928.tar.gz.ab",
"https://10.30.114.115/common/data/export/CassandraDataset_1515720928/CassandraDataset_1515720928.tar.gz.ac",
"https://10.30.114.115/common/data/export/CassandraDataset_1515720928/CassandraDataset_1515720928.tar.gz.aa"
]
},
{
"lastModified": "Fri Jan 12 01:35:42 UTC 2018",
"totalFileSizeInBytes": 132,
"fileUrl": [
"https://10.30.114.115/common/data/export/CassandraDataset_1515720941/CassandraDataset_1515720941.tar.gz"
]
}
]
To merge the parts of .tar.gz files, use the following UNIX commands:
cat CassandraDataset_1515720916.tar.gz.aa CassandraDataset_1515720916.tar.gz.ab CassandraDataset_1515720916.tar.gz.ac >> CassandraDataset_1515720916.tar.gz

OR

cat CassandraDataset_1515720916.tar.gz.* >> CassandraDataset_1515720916.tar.gz

API History

Table 47. API history

Release

Modification

Cisco CMX Release 10.5

This API is introduced.

GET: Is Data Export Running

Description

This API returns if the data export utility (Cassandra data extraction process) is currently running or not. Note that CMX allows for only one extraction process to run at a time.

If the process is not running, the API returns FALSE indicating that a new extraction job can be triggered using the POST API.

If the process is running, the API returns TRUE indicating that an instance of the extraction job is already running. You can keep querying this API with an interval of a few minutes to check the status before submitting another job.

HTTP Method

GET

Resource URI

/api/config/v1/historydata/export/isrunning

Requires OAuth

N

Parameters

None.

Content Type

The response is a JSON and contains the URL of all available files.

Sample Output

application/json

{"isRunning":false}

{"isRunning":true}

API History

Table 48. API history

Release

Modification

Cisco CMX Release 10.5

This API is introduced.

POST: Trigger History data export

Description

This API triggers data export for a given day or date. The API enables you to extract a large amount of raw history data in JSON format from the Cisco CMX's Cassandra database.

When the API is invoked, Cisco CMX spawns a process to extract data from Cassandra. All the history records that match the query parameters are dumped into a data file. This data file can then be downloaded from Cisco CMX server over HTTP and you can perform your own analytics by processing the JSON data. Each line in the data file represents a history record.

Note that you cannot run multiple extraction jobs at a time. If the job is already running, The API returns HTTP 403 Forbidden, meaning that the job is already running.

Let us observe how the API works.

The API accepts the date for which data needs to exported. This parameter is mandatory.

If you want to export all the history records that are generated on 2017/11/29,

POST /api/config/v1/historydata/export?date=2017/11/29

Once the extraction is complete, the exported data file can be download over HTTP.

GET /api/config/v1/historydata/export

You could also mention a specific range of hours for which you want to export the data for a given date. The value of fromHour cannot be greater than the value of toHour.

If you want to export history data generated on 2017/11/29, starting Midnight to 4 AM.

POST /api/config/v1/historydata/export?date=2017/11/29&fromHour=0&toHour=4 

If you want to export history data generated on 2017/11/29 starting Midnight to 9 AM.

HTTP POST /api/config/v1/historydata/export?date=2017/11/29&fromHour=0&toHour=9 

If you want to export history data generated on 2017/11/29 starting Midnight to 1 PM.

POST /api/config/v1/historydata/export?date=2017/11/29&fromHour=0&toHour=13 

If you want to export history data generated on 2017/11/29 starting 4 PM to 9 PM.

POST /api/config/v1/historydata/export?date=2017/11/29&fromHour=16&toHour=21

HTTP Method

POST

Resource URI

/api/config/v1/historydata/export

Requires OAuth

N

Parameters

Table 49. Parameter Details

Name

Required

Default

Type

Location

Description

date

Y

String

body

The date for which data export needs to be triggered. The expected date format is yyyy/MM/dd .

fromHour

N

String

body

This field expects an integer value within the range zero to 23. The field is used to export the data for a specific duration of the day. The API looks at fromHour and toHour parameters and exports data accordingly.

toHour

N

String

body

This field expects an integer value within the range one to 24. This is used to export the data for a specific duration of the day. The API looks at fromHour and toHour parameters and exports data accordingly.

Content Type

application/json

Sample Input

http://<host-ip-address>/api/config/v1/historydata/export?date=2017/11/29&fromHour=0&toHour=1

Sample Output

Response:

"Cassandra data export utility triggered successfully."

Device Count API

GET: Device Count

Description

This API returns the device count for different types of device and also the number of unique devices seen in that day.

HTTP Method

GET

Resource URI

/api/config/v1/location/count/

Requires OAuth

N

Parameters

None.

Content Type

The response is a JSON and contains the count of devices seen for different type of devices.

Sample Output

application/json. The response contains the following:

  • Active Count for different device types at that instant.

  • Untracked Device Counts for different device types at that instant.

  • Total number of Unique Device (Mac address) seen in that day, this count resets to zero at Midnight.

{"untrackedCounts":{"INTERFERER":0,"ROGUE":0,"BLE_TAG":0,"ATTACKER":0,"ROGUE_AP":0,"ROGUE_CLIENT":0,
"TAG":0,"CLIENT":3,"WIRED_CLIENT":0},"trackedElementsLimit":300000,"untrackedDueToFilterCounts":{},
"activeElementCount":292,"locallyAdministeredClientCount":0,"activeCounts":
{"INTERFERER":0,"ROGUE":0,"BLE_TAG":0,"ATTACKER":0,"ROGUE_AP":232,"ROGUE_CLIENT":0,"TAG":5,"CLIENT":
{"All":55,"Associated":0,"Probing":55},"WIRED_CLIENT":0},"uniqueDeviceCount":375}
}

API History

Table 50. API History

Release

Modification

Cisco CMX Release 10.6.2

This API is introduced.