Plugins¶
newrelic_api.plugins¶
- class newrelic_api.plugins.Plugins(api_key=None)¶
An interface for interacting with the NewRelic Plugins 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_guid=None, filter_ids=None, detailed=None, page=None)¶
This API endpoint returns a paginated list of the plugins associated with your New Relic account.
Plugins can be filtered by their name or by a list of IDs.
Parameters: Return type: dict
Returns: The JSON response of the API, with an additional ‘pages’ key if there are paginated results
{ "plugins": [ { "id": "integer", "name": "string", "guid": "string", "publisher": "string", "details": { "description": "integer", "is_public": "string", "created_at": "time", "updated_at": "time", "last_published_at": "time", "has_unpublished_changes": "boolean", "branding_image_url": "string", "upgraded_at": "time", "short_name": "string", "publisher_about_url": "string", "publisher_support_url": "string", "download_url": "string", "first_edited_at": "time", "last_edited_at": "time", "first_published_at": "time", "published_version": "string" }, "summary_metrics": [ { "id": "integer", "name": "string", "metric": "string", "value_function": "string", "thresholds": { "caution": "float", "critical": "float" }, "values": { "raw": "float", "formatted": "string" } } ] } ], "pages": { "last": { "url": "https://api.newrelic.com/v2/plugins.json?page=2", "rel": "last" }, "next": { "url": "https://api.newrelic.com/v2/plugins.json?page=2", "rel": "next" } } }
- show(id, detailed=None)¶
This API endpoint returns a single Key transaction, identified its ID.
Parameters: Return type: dict
Returns: The JSON response of the API
{ "plugin": { "id": "integer", "name": "string", "guid": "string", "publisher": "string", "details": { "description": "integer", "is_public": "string", "created_at": "time", "updated_at": "time", "last_published_at": "time", "has_unpublished_changes": "boolean", "branding_image_url": "string", "upgraded_at": "time", "short_name": "string", "publisher_about_url": "string", "publisher_support_url": "string", "download_url": "string", "first_edited_at": "time", "last_edited_at": "time", "first_published_at": "time", "published_version": "string" }, "summary_metrics": [ { "id": "integer", "name": "string", "metric": "string", "value_function": "string", "thresholds": { "caution": "float", "critical": "float" }, "values": { "raw": "float", "formatted": "string" } } ] } }