Cloud Management API 1.5

Alerts

An Alert represents an AlertSpec bound to a running Instance.

Actions

index

Lists all Alerts.

URLs
GET /api/alerts
GET /api/clouds/:cloud_id/instances/:instance_id/alerts
GET /api/deployments/:deployment_id/alerts
GET /api/server_arrays/:server_array_id/alerts
GET /api/servers/:server_id/alerts
HTTP response code
200 OK
Content-type
application/vnd.rightscale.alert;type=collection

Required roles

Parameters

name required type values regexp blank? description
filter no Array * * no See below for valid filter parameters.
view no String default * no Specifies how many attributes and/or expanded nested relationships to include.

Filters

name partial_match? description
alert_spec_href no The href of the AlertSpec to filter on.
status no The status to filter on. The status is case-sensitive and must be one of: 'enabled', 'disabled', 'quenched', or 'triggered'.

Example Responses

Click on a format below to see an example response:

JSON XML
[{
  "created_at": "2023/10/09 11:06:01 +0000",
  "updated_at": "2023/10/09 11:06:01 +0000",
  "links": [
    {"rel":"self","href":"/api/alerts/1"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"},
    {"rel":"alert_spec","href":"/api/alert_specs/1"}
  ],
  "actions": [
    {
      "rel": "quench"
    },
    {
      "rel": "disable"
    }
  ],
  "status": "enabled"
},{
  "created_at": "2023/10/09 11:06:03 +0000",
  "updated_at": "2023/10/09 11:06:03 +0000",
  "links": [
    {"rel":"self","href":"/api/alerts/2"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_1620899759;RAND"},
    {"rel":"alert_spec","href":"/api/alert_specs/2"}
  ],
  "actions": [
    {
      "rel": "quench"
    },
    {
      "rel": "disable"
    }
  ],
  "status": "enabled"
}]
<?xml version="1.0" encoding="UTF-8"?>
<alerts>
  <alert>
    <created_at>2023/10/09 11:06:01 +0000</created_at>
    <updated_at>2023/10/09 11:06:01 +0000</updated_at>
    <links>
      <link rel="self" href="/api/alerts/1"/>
      <link rel="instance" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND"/>
      <link rel="alert_spec" href="/api/alert_specs/1"/>
    </links>
    <actions>
      <action rel="quench"/>
      <action rel="disable"/>
    </actions>
    <status>enabled</status>
  </alert>
  <alert>
    <created_at>2023/10/09 11:06:03 +0000</created_at>
    <updated_at>2023/10/09 11:06:03 +0000</updated_at>
    <links>
      <link rel="self" href="/api/alerts/2"/>
      <link rel="instance" href="/api/clouds/888/instances/RESOURCE_1620899759;RAND"/>
      <link rel="alert_spec" href="/api/alert_specs/2"/>
    </links>
    <actions>
      <action rel="quench"/>
      <action rel="disable"/>
    </actions>
    <status>enabled</status>
  </alert>
</alerts>

show

Shows the attributes of a specified Alert.

URLs
GET /api/alerts/:id
GET /api/clouds/:cloud_id/instances/:instance_id/alerts/:id
GET /api/deployments/:deployment_id/alerts/:id
GET /api/server_arrays/:server_array_id/alerts/:id
GET /api/servers/:server_id/alerts/:id
HTTP response code
200 OK
Content-type
application/vnd.rightscale.alert

Required roles

Parameters

name required type values regexp blank? description
view no String default * no Specifies how many attributes and/or expanded nested relationships to include.

Example Responses

Click on a format below to see an example response:

JSON XML
{
  "created_at": "2023/10/09 11:06:01 +0000",
  "updated_at": "2023/10/09 11:06:01 +0000",
  "links": [
    {"rel":"self","href":"/api/alerts/1"},
    {"rel":"instance","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"},
    {"rel":"alert_spec","href":"/api/alert_specs/1"}
  ],
  "actions": [
    {
      "rel": "quench"
    },
    {
      "rel": "disable"
    }
  ],
  "status": "enabled"
}
<?xml version="1.0" encoding="UTF-8"?>
<alert>
  <created_at>2023/10/09 11:06:01 +0000</created_at>
  <updated_at>2023/10/09 11:06:01 +0000</updated_at>
  <links>
    <link rel="self" href="/api/alerts/1"/>
    <link rel="instance" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND"/>
    <link rel="alert_spec" href="/api/alert_specs/1"/>
  </links>
  <actions>
    <action rel="quench"/>
    <action rel="disable"/>
  </actions>
  <status>enabled</status>
</alert>

destroy

Destroys the Alert.

URLs
DELETE /api/alerts/:id
DELETE /api/clouds/:cloud_id/instances/:instance_id/alerts/:id
DELETE /api/deployments/:deployment_id/alerts/:id
DELETE /api/server_arrays/:server_array_id/alerts/:id
DELETE /api/servers/:server_id/alerts/:id
HTTP response code
204 No Content

Required roles

disable

Disables the Alert indefinitely. Idempotent.

URLs
POST /api/alerts/:id/disable
POST /api/clouds/:cloud_id/instances/:instance_id/alerts/:id/disable
POST /api/deployments/:deployment_id/alerts/:id/disable
POST /api/server_arrays/:server_array_id/alerts/:id/disable
POST /api/servers/:server_id/alerts/:id/disable
HTTP response code
204 No Content

Required roles

enable

Enables the Alert indefinitely. Idempotent.

URLs
POST /api/alerts/:id/enable
POST /api/clouds/:cloud_id/instances/:instance_id/alerts/:id/enable
POST /api/deployments/:deployment_id/alerts/:id/enable
POST /api/server_arrays/:server_array_id/alerts/:id/enable
POST /api/servers/:server_id/alerts/:id/enable
HTTP response code
204 No Content

Required roles

quench

Suppresses the Alert from being triggered for a given time period. Idempotent.

URLs
POST /api/alerts/:id/quench
POST /api/clouds/:cloud_id/instances/:instance_id/alerts/:id/quench
POST /api/deployments/:deployment_id/alerts/:id/quench
POST /api/server_arrays/:server_array_id/alerts/:id/quench
POST /api/servers/:server_id/alerts/:id/quench
HTTP response code
204 No Content
Content-type
application/vnd.rightscale.text

Required roles

Parameters

name required type values regexp blank? description
duration yes String * * no The time period in seconds to suppress Alert from being triggered.