Browser Applications

newrelic_api.browser_applications

class newrelic_api.browser_applications.BrowserApplications(api_key=None)

An interface for interacting with the NewRelic Browser Application 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.
create(name)

This API endpoint allows you to create a standalone Browser Application

Parameters:name (str) – The name of the application
Return type:dict
Returns:The JSON response of the API
{
    "browser_application": {
        "id": "integer",
        "name": "string",
        "browser_monitoring_key": "string",
        "loader_script": "string"
    }
}
list(filter_name=None, filter_ids=None, page=None)

This API endpoint returns a list of the Browser Applications associated with your New Relic account.

Browser Applications can be filtered by their name, or by the application IDs.

Parameters:
  • filter_name (str) – Filter by application name
  • filter_ids (list of ints) – Filter by application 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

{
    "browser_applications": [
        {
            "id": "integer",
            "name": "string",
            "browser_monitoring_key": "string",
            "loader_script": "string"
        }
    ],
    "pages": {
        "last": {
            "url": "https://api.newrelic.com/v2/browser_applications.json?page=2",
            "rel": "last"
        },
        "next": {
            "url": "https://api.newrelic.com/v2/browser_applications.json?page=2",
            "rel": "next"
        }
    }
}