Hosted Graphite Docs
Get StartedBook a Demo
  • Welcome to Hosted Graphite
  • Getting Started
  • HG-CLI
  • Sending Metrics
    • Supported Protocols
    • Graphite Tag Support
    • Metric Management
    • Metric APIs
  • Language Guide
    • Metric Libraries
    • .NET
    • Go
    • Java
    • Javascript
    • Node.js
    • PHP
    • Postman
    • Python 2.x
    • Python 3.x
    • Python Pickle
    • Ruby
    • Shell
    • TypeScript
  • Dashboard and Graphs
    • Primary Dashboards
    • Dashboard Library
    • Local Dashboard Integration
    • Worldmap Panel
    • Graphite Dashboard Guide
    • Graphite Graph Menu Reference
    • Other Dashboard Options
  • Alerting Guide
    • Alerting Overview
    • Alerts API
    • Notification Channels API
    • Scheduled Mutes API
    • Using Your Own Alerting
  • Agents Guide
    • The Hosted Graphite Agent
      • Base Metrics
      • System Layout
    • Telegraf
    • K8 Telegraf Daemon
    • OpenTelemetry
    • collectd Agent
    • StatsD Agent
    • Diamond
  • Add-Ons and Integrations Guide
    • AWS CloudWatch
    • Azure Monitor Metrics
    • GCP Metrics
    • Carbon-C-Relay
    • Circle CI
    • Cloudbees
    • Collectd Add Ons
    • GitHub
    • GitLab
    • Heroku
    • Hosted StatsD
    • New Relic
    • Papertrail
    • Pingdom
    • Sentry
    • Sitespeed
    • StatsD Add-on
    • Statuspage
  • Account Management
    • Access Keys
    • Account Diagnostics
    • Account Settings
    • Team Access: Limited Access Groups
    • SAML Authentication
    • Team Access
  • Additional Features
    • Aggregation Rules
    • Data Views
  • API Guides
    • Metrics API
    • Tag API
    • Graphite Render API
    • Render Variables API
    • Dashboard API
    • Annotations and Events API
    • Aggregation Rules API
    • Alerts APIs
  • FAQ
    • General
    • Business
    • Technical
    • Account Metrics and Limiting
    • Customization
    • Troubleshooting
    • Support
    • Changelog
Powered by GitBook
On this page
  • Creating notification channels
  • Searching notification channels
  • Obtain information on a single notification
  • Updating notification channels
  • Deleting notification channels

Was this helpful?

  1. Alerting Guide

Notification Channels API

PreviousAlerts APINextScheduled Mutes API

Last updated 4 months ago

Was this helpful?

Contents

POST /v2/notifications/

Path Parameters

Name
Type
Description

type*

String

The type of notification channel to create.

description*

String

A name for the channel.

destination*

String

The destination for the notification. ie the email address for email, slack webhook URL for slack, etc.

auto_resolve

String

Only used by VictorOps and PagerDuty channels. Defaults to false. More info here.

HTTP/1.1 201 
Content-Type: application/json
{
  "id": "id",
  "url": "/v2/notifications/<notification_id>"
}

Not Found Invalid form data

Conflict Channel with the description already exists.

Request format:

HTTP/1.1 200
Content-Type: application/json

{
  "type": "email" | "pagerduty" | "slack" | "webhook" | "victorops" | "opsgenie",
  "description": "Descriptive name for channel",
  "destination": "Destination key of the channel.",
  "auto_resolve": True | False
}

Curl example

curl -H "Content-Type: application/json" -X POST -d \
'{"type": "email", "description": "A test notification", "destination": "email@example.com"}' \
"https://YOUR-API-KEY@api.hostedgraphite.com/v2/notifications/"

GET /v2/notifications/?query

Returns a JSON object containing information on notification channels matching the search query. Returns all the notifications if the parameter is left empty.

Path Parameters

Name
Type
Description

type

String

Format: &type=<type_1>&type=<type_2>

The notification type to search for. Can specify multiple types to search for more than 1.

description

String

Format: &descriptions=<descriptions_1>&descriptions=<descriptions_2>

The descriptions to search for. Can specify multiple descriptions to search for more than 1.

id

String

Format: &id=<id_1>&id=<id_2>

The notification id to search for. Can specify multiple ids to search for more than 1.

page

String

Format: &page=1

The page number to query. Used if there are more items than can be displayed in a single request (default: 1).

max

String

Format: &max=50

The maximum number of items to display. Limit of 100 (default: 100).

auto_resolve

String

For use with VictorOps and PagerDuty channels only.

HTTP/1.1 200 
Content-Type: application/json 
{
  "notifications": [
    {
      "type": "email",
      "destination": "example@example.com",
      "description": "Email notification channel",
      "id": "notification_channel_1",
      "auto_resolve": true
    },
    {
      "type": "slack",
      "destination": "https://slack-webhook-url.com",
      "description": "Slack notification channel",
      "id": "notification_channel_2",
      "auto_resolve": false
    }
  ],
  "next_page": false
}

Bad Request Invalid

Curl example

curl -X GET "https://YOUR-API-KEY@api.hostedgraphite.com/v2/notifications/?type=email&type=slack"

Specifying multiple fields performs an OR operation and returns notifications that match either criteria.


GET /v2/notifications/<notification_id>/

Returns a single notification identified by the notification id.

Path Parameters

Name
Type
Description

type*

String

The type of notification channel to create.

description*

String

A name for the channel.

destination*

String

The destination for the notification. ie the email address for email, slack webhook URL for slack, etc.

auto_resolve

String

Only used by VictorOps and PagerDuty channels. Defaults to false.

HTTP/1.1 200 
Content-Type: application/json 
{
  "type": "email",
  "description": "Primary email notification channel",
  "destination": "example@example.com",
  "id": "notification_channel_1",
  "auto_resolve": true
}

Bad Request Doesn't exist

Curl example

curl -X GET "https://YOUR-API-KEY@api.hostedgraphite.com/v2/notification/123-456-789/"

Obtain information of the notification channel identified by the id 123-456-789.


PUT /v2/notifications/<notification_id>/

Updates a notification channel identified by the notification id.

Path Parameters

Name
Type
Description

type

String

The type of notification channel to create.

description

String

A name for the channel.

destination

String

The destination for the notification. ie the email address for email, slack webhook URL for slack, etc.

auto_resolve

String

Only used by VictorOps and PagerDuty channels. Defaults to false.

HTTP/1.1 200 
Content-Type: application/json 
{
  "type": "slack",
  "description": "Slack notification channel",
  "destination": "https://slack-webhook-url.com",
  "id": "notification_channel_2",
  "auto_resolve": false
}

Bad Request Invalid form data

Not Found Doesn't exist

Conflict Notification channel with the description already exists.

Curl example

curl -H "Content-Type: application/json" -X PUT \
 -d '{"destination": "new_email@example.com"}' \
"https://YOUR-API-KEY@api.hostedgraphite.com/v2/notifications/123-456-789/"

Updates the destination of notification 123-456-789. Each field is optional and only the specified fields are updated.


DELETE /v2/notifications/<notification_id>/ - Deletes a notification channel identified by the notification id.

Curl example

curl -X DELETE "https://YOUR-API-KEY@api.hostedgraphite.com/v2/notifications/123-456-789/"

Delete the notification channel identified by the id 123-456-789.

Status Codes:

  • 200 - OK

  • 404 - Notification channel doesn’t exist.

Notification Channels API
Creating notification channels
Searching notification channels
Obtain information on a single notification
Updating notification channels
Deleting notification channels
Creating notification channels
Searching notification channels
Obtain information on a single notification
Updating notification channels
Deleting notification channels