Deprecation Notice - Alerts Channels

Create

<strong>🔥 This endpoint will be deprecated after 2024/01 🔥</strong> New users should use <a href="https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-nerdgraph/nerdgraph-api-examples/">these docs about managing alerts via NerdGraph.</a>

<p>This API endpoint works with new Alerts on alerts.newrelic.com.</p> <p>It creates a channel associated with your New Relic account.</p> <p>Note: <a href="https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/rest-api-key">Admin User’s API Key</a> is required.</p> <p>See our documentation for a discussion on <a href="https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#channels-create">creating notification channels</a>.</p> <p>Channel type configuration options:</p> <ul> <li> <p>Email</p>
<p>{</p>

<pre><code>"recipients" : "test@google.com",

"include_json_attachment" : true </code></pre>

<p>}</p>
</li> <li> <p>HipChat</p>
<p>{</p>

<pre><code>"auth_token": "abc123",

"room_id": "google.com" </code></pre>

<p>}</p>
</li> <li> <p>OpsGenie</p>
<p>{</p>

<pre><code>"api_key": "abc123",

"teams": "team1", "tags": "tag1", "recipients": "me@me.com" </code></pre>

<p>}</p>
</li> <li> <p>Slack</p>
<p>{</p>

<pre><code>"url": "http://test.com",

"channel": "channel1" </code></pre>

<p>}</p>
</li> <li> <p>Campfire</p>
<p>{</p>

<pre><code>"subdomain": "mysubdomain",

"token": "123abc", "room": "room1" </code></pre>

<p>}</p>
</li> <li> <p>Victorops</p>
<p>{</p>

<pre><code>"key": "mykey",

"route_key": "theroute" </code></pre>

<p>}</p>
</li> <li> <p>PagerDuty</p>
<p>{</p>

<pre><code>"service_key": "myservicekey"

</code></pre>

<p>}</p>
</li> <li> <p>Webhook (json)</p>
<p>{</p>

<pre><code>"base_url": "http://test.com",

"auth_username": "username", "auth_password": "password", "payload_type": "application/json", "payload": { "account_id": "$ACCOUNT_ID", "account_name": "$ACCOUNT_NAME", "condition_id": "$CONDITION_ID", "condition_name": "$CONDITION_NAME", "current_state": "$EVENT_STATE", "details": "$EVENT_DETAILS", "event_type": "$EVENT_TYPE", "incident_acknowledge_url": "$INCIDENT_ACKNOWLEDGE_URL", "incident_id": "$INCIDENT_ID", "incident_url": "$INCIDENT_URL", "owner": "$EVENT_OWNER", "policy_name": "$POLICY_NAME", "policy_url": "$POLICY_URL", "runbook_url": "$RUNBOOK_URL", "severity": "$SEVERITY", "targets": "$TARGETS", "timestamp": "$TIMESTAMP", "violation_chart_url": "$VIOLATION_CHART_URL" }, "headers": {"header1": "test", "header2": "test"} </code></pre>

<p>}</p>
</li> <li> <p>Webhook (x-www-form-urlencoded)</p>
<p>{</p>

<pre><code>"base_url": "http://test.com",

"auth_username": "username", "auth_password": "password", "payload_type": "application/x-www-form-urlencoded", "payload": { "account_id": "$ACCOUNT_ID", "account_name": "$ACCOUNT_NAME", "condition_id": "$CONDITION_ID", "condition_name": "$CONDITION_NAME", "current_state": "$EVENT_STATE", "details": "$EVENT_DETAILS", "event_type": "$EVENT_TYPE", "incident_acknowledge_url": "$INCIDENT_ACKNOWLEDGE_URL", "incident_id": "$INCIDENT_ID", "incident_url": "$INCIDENT_URL", "owner": "$EVENT_OWNER", "policy_name": "$POLICY_NAME", "policy_url": "$POLICY_URL", "runbook_url": "$RUNBOOK_URL", "severity": "$SEVERITY", "targets": "$TARGETS", "timestamp": "$TIMESTAMP", "violation_chart_url": "$VIOLATION_CHART_URL" }, "headers": {"header1": "test", "header2": "test"} </code></pre>

<p>}</p>
</li> </ul>
post/alerts_channels.json

Request

Query parameters

policy_idsstring[]

Policy IDs to associate with channel

Request body

Response

No response was specified

Changes

No recorded changes to this operation across all 1 revision of this API.