Key Transactions

newrelic_api.key_transactions

class newrelic_api.key_transactions.KeyTransactions(api_key=None)

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

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

Key transactions can be filtered by their name or by a list of IDs.

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

dict

Returns:

The JSON response of the API

{
    "key_transactions": [
        {
            "id": "integer",
            "name": "string",
            "transaction_name": "string",
            "application_summary": {
                "response_time": "float",
                "throughput": "float",
                "error_rate": "float",
                "apdex_target": "float",
                "apdex_score": "float"
            },
            "end_user_summary": {
                "response_time": "float",
                "throughput": "float",
                "apdex_target": "float",
                "apdex_score": "float"
            },
            "links": {
                "application": "integer"
            }
        }
    ]
}
show(id)

This API endpoint returns a single Key transaction, identified its ID.

Parameters:id (int) – Key transaction ID
Return type:dict
Returns:The JSON response of the API
{
    "key_transaction": {
        "id": "integer",
        "name": "string",
        "transaction_name": "string",
        "application_summary": {
            "response_time": "float",
            "throughput": "float",
            "error_rate": "float",
            "apdex_target": "float",
            "apdex_score": "float"
        },
        "end_user_summary": {
            "response_time": "float",
            "throughput": "float",
            "apdex_target": "float",
            "apdex_score": "float"
        },
        "links": {
            "application": "integer"
        }
    }
}