Users

newrelic_api.users

class newrelic_api.users.Users(api_key=None)

An interface for interacting with the NewRelic user 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_email=None, filter_ids=None, page=None)

This API endpoint returns a paginated list of the Users associated with your New Relic account. Users can be filtered by their email or by a list of user IDs.

Parameters:
  • filter_email (str) – Filter by user email
  • filter_ids (list of ints) – Filter by user ids
  • page (int) – Pagination index
Return type:

dict

Returns:

The JSON response of the API

show(id)

This API endpoint returns a single User, identified its ID.

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