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
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
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
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:
|
enabled |
N |
— |
enumerated |
body |
enabled
|
enableMacScrambling |
N |
— |
enumerated |
body |
enableMacScrambling
|
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
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
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
Name |
Required |
Default |
Type |
Location |
Description |
---|---|---|---|---|---|
severity |
Y |
— |
enumerated |
body |
Choose one of the following severity levels:
|
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:
|
enabled |
N |
— |
enumerated |
body |
enabled
|
enableMacScrambling |
N |
— |
enumerated |
body |
enableMacScrambling
|
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
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
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
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
Name |
Required |
Default |
Type |
Location |
Description |
---|---|---|---|---|---|
name |
Y |
— |
String |
pathReplace |
Notification Name. |
action |
Y |
— |
String |
pathReplace |
Enable/Disable |
Content Type
application/json