Notification Channels

newrelic_api.notification_channels

class newrelic_api.notification_channels.NotificationChannels(api_key=None)

An interface for interacting with the NewRelic Notification Channels API.

__init__(api_key=None)
Parameters:api_key (str) – The API key. If no key is passed, the environment variable NEW_RELIC_API_KEY is used.
Raises:If the api_key parameter is not present, and no environment variable is present, a newrelic_api.exceptions.ConfigurationException is raised.
list(filter_type=None, filter_ids=None, page=None)

This API endpoint returns a paginated list of the notification channels associated with your New Relic account.

Notification channels can be filtered by their type or a list of IDs.

Parameters:
  • filter_type (list of str) – Filter by notification channel types
  • filter_ids (list of int) – Filter by notification channel ids
  • page (int) – Pagination index
Return type:

dict

Returns:

The JSON response of the API, with an additional ‘pages’ key if there are paginated results

show(id)

This API endpoint returns a single notification channel, identified by ID.

Parameters:id (int) – notification channel ID
Return type:dict
Returns:The JSON response of the API