Nav

Working with Alerts

logo cloud active logo hybrid disabled logo server disabled logo pcf disabled

This document describes how to call the CloudHub API. For information on how to perform these same tasks more easily via the Runtime Manager UI, see CloudHub and its child pages.

The alerts API allows you to create alerts. All resources or methods that return or accept a type (except where noted) use the application JSON type. As an example, here’s a Curl command that would create an alert.

curl --verbose -XPOST 'https://<USERNAME>:<PASSWORD>@anypoint.mulesoft.com/cloudhub/api/v2/alerts' -H "content-type: application/json" -d '{
  "name": "failure",
  "severity": "INFO",
  "condition": {
  	"resourceType": "cloudhub-application",
    "type": "deployment-failed",
    "resources": [
      "<CLOUDHUB APPLICATION NAME>"
    ]
  },
  "actions": [
    {
      "type": "email",
      "emails": [
        "me@example.com"
      ],
      "subject": "subject line",
      "content": "deployment failed for ${resource}"
    }
  ]
}' -H "content-type: application/json"

See API Portal of the CloudHub API for an interactive reference of all the supported resources, methods, required properties and expected responses.

In this topic:

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+