Chapter 4. Cloud Alerts API
4.1. List Alerts
4.1.1. Description
List alerts associated with an app.
4.1.2. Endpoint
- uri - /box/srv/1.1/cm/eventlog/alert/list
- method - POST
4.1.3. Request Body
{
"appGuid":"<24 char String>",
"env":"<environment>"
}4.1.4. Response Body
4.1.4.1. Success
{
"list":[
{
"alertName": "AppTerminated",
"emails": "test@example.com",
"enabled": true,
"env": "dev",
"eventCategories": "APP_STATE",
"eventNames": "",
"eventSeverities": "FATAL",
"guid": "iV5E_ASJcQ_83TOgbDpYbHIp",
"sysCreated": "2013-06-28 11:09:05",
"sysModified": "2013-06-28 11:09:05",
"uid": "ajBTU-_UMtc7ggOCL6MbZRP_"
},
...
],
"status":"ok"
}4.1.4.2. Error
{
"status": "error",
"message": "<error_message>"
}4.2. Create An Alert
4.2.1. Description
Create a new alert for an app.
4.2.2. Endpoint
- uri - /box/srv/1.1/cm/eventlog/alert/create
- method - POST
4.2.3. Request Body
{
"alertName": "<The name of the alert, for example, TestAlert>",
"emails": "<The recipients of the alert>",
"enabled": "<true|false>",
"env": "<environment>",
"eventCategories": "<any of the event categories, for example, APP_STATE>",
"eventNames": "<any of the event name, for example, APP_TERMINATED. NOTE, if this is specified as well as the event categories and severities, need to make sure categories and severies are valid for the events>",
"eventSeverities": "<any of the event severities, for example, FATAL>",
"uid": "<the guid of the app>"
}4.2.4. Response Body
4.2.4.1. Success
{
"alertName": "TestAlert",
"emails": "test@example.com",
"enabled": true,
"env": "dev",
"eventCategories": "APP_STATE",
"eventNames": "TERMINATED",
"eventSeverities": "FATAL",
"guid": "F9zwTLwAwsaTZP7I45sOtRKJ",
"sysCreated": "2013-07-04 15:32:54",
"sysModified": "2013-07-04 15:32:54",
"uid": "ajBTU-_UMtc7ggOCL6MbZRP_",
"status":"ok"
}4.2.4.2. Error
{
"status": "error",
"message": "<error_message>"
}4.3. Update An Alert
4.3.1. Description
Update an existing alert for an app.
4.3.2. Endpoint
- uri - /box/srv/1.1/cm/eventlog/alert/update
- method - POST
4.3.3. Request Body
{
"guid":"<The unique id of the alert>",
"alertName": "<The name of the alert, for example, TestAlert>",
"emails": "<The recipients of the alert>",
"enabled": "<true|false>",
"env": "<environment>",
"eventCategories": "<any of the event categories, for example, APP_STATE>",
"eventNames": "<any of the event name, for example, APP_TERMINATED. NOTE, if this is specified as well as the event categories and severities, need to make sure categories and severies are valid for the events>",
"eventSeverities": "<any of the event severities, for example, FATAL>",
"uid": "<the guid of the app>"
}4.3.4. Response Body
4.3.4.1. Success
{
"alertName": "TestAlert",
"emails": "test@example.com, test1@example.com",
"enabled": true,
"env": "dev",
"eventCategories": "APP_STATE",
"eventNames": "TERMINATED",
"eventSeverities": "FATAL",
"guid": "F9zwTLwAwsaTZP7I45sOtRKJ",
"sysCreated": "2013-07-04 15:32:54",
"sysModified": "2013-07-04 15:32:54",
"uid": "ajBTU-_UMtc7ggOCL6MbZRP_",
"status":"ok"
}4.3.4.2. Error
{
"status": "error",
"message": "<error_message>"
}4.4. Delete An Alert
4.4.1. Description
Delete an existing alert for an app.
4.4.2. Endpoint
- uri - /box/srv/1.1/cm/eventlog/alert/delete
- method - POST
4.4.3. Request Body
{
"guid":"<The unique id of the alert>",
"alertName": "<The name of the alert, for example, TestAlert>",
"emails": "<The recipients of the alert>",
"enabled": "<true|false>",
"env": "<environment>",
"eventCategories": "<any of the event categories, for example, APP_STATE>",
"eventNames": "<any of the event name, for example, APP_TERMINATED. NOTE, if this is specified as well as the event categories and severities, need to make sure categories and severies are valid for the events>",
"eventSeverities": "<any of the event severities, for example, FATAL>",
"uid": "<the guid of the app>"
}4.4.4. Response Body
4.4.4.1. Success
{
"alertName": "TestAlert",
"emails": "test@example.com, test1@example.com",
"enabled": true,
"env": "dev",
"eventCategories": "APP_STATE",
"eventNames": "TERMINATED",
"eventSeverities": "FATAL",
"guid": "F9zwTLwAwsaTZP7I45sOtRKJ",
"sysCreated": "2013-07-04 15:32:54",
"sysModified": "2013-07-04 15:32:54",
"uid": "ajBTU-_UMtc7ggOCL6MbZRP_",
"status":"ok"
}4.4.4.2. Error
{
"status": "error",
"message": "<error_message>"
}4.5. List Email Notifications
4.5.1. Description
List all the email notifications that are sent for an app.
4.5.2. Endpoint
- uri - /box/srv/1.1/cm/eventlog/alert/listAudit
- method - POST
4.5.3. Request Body
{
"appGuid":"<24 char String>",
"env":"<environment>"
}4.5.4. Response Body
4.5.4.1. Success
{
"list":[
{
"alertName": "AppTerminated",
"body": "<Email Content>",
"env": "dev",
"guid": "RD0O6ByAU_BwJRolaZUhXpl8",
"recipients": "wei.li@feedhenry.com",
"subject": "FeedHenry DynoFarm Testing Alert: AppTerminated - EventsTestApp1 (ajBTU-_UMtc7ggOCL6MbZRP_)",
"sysCreated": "2013-07-04 14:24:23",
"sysModified": "2013-07-04 14:24:23",
"uid": "ajBTU-_UMtc7ggOCL6MbZRP_"
},
...
],
"status":"ok"
}4.5.4.2. Error
{
"status": "error",
"message": "<error_message>"
}
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.