Skip to main content

REST API for New Relic

Project description

Wrapper for New Relic Insights API

Avaliable Methods

  • get_data(account,query_api_key,query)
    • returns result in JSON format
  • insert_data(account,insert_api_key,data_df)
    • return response status as a list

Sample Code

Get Request

from NRInsightsApi import get_data
r =  get_data('2929995','JSJW_WKJSJ_192920_192820','SELECT average(duration) FROM PageView')
{'results': [{'average': None}], 'performanceStats': {'inspectedCount': 0, 'omittedCount': 0, 'matchCount': 0, 'wallClockTime': 1}, 
'metadata': {'eventTypes': ['PageView'], 'eventType': 'PageView', 'openEnded': True, 'beginTime': '2021-03-31T02:48:58Z', 'endTime': '2021-03-31T03:48:58Z', 'beginTimeMillis': 1617158938335, 'endTimeMillis': 1617162538335, 'rawSince': '60 MINUTES AGO', 'rawUntil': 'NOW', 'rawCompareWith': '', 'guid': '4ade46ba-5782-6d40-7627-1411ca37131f', 'routerGuid': '74da0adc-aa35-7d58-a977-667954ca56aa', 'messages': ['No events found -- do you have the correct event type and time range?'], 'info': ['No events found -- do you have the correct event type and time range?'], 'contents': [{'function': 'average', 'attribute': 'duration', 'simple': True}]}}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NRInsightsApi-0.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

NRInsightsApi-0.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file NRInsightsApi-0.0.1.tar.gz.

File metadata

  • Download URL: NRInsightsApi-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for NRInsightsApi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ad60bcc812f369f29cee42b63469de2b615cb4dd65c9de0ad89b741827886c4b
MD5 6ad2b69459c56088670c935591213f7c
BLAKE2b-256 8e01f11e8192a1dd73d1b9674b608c2f64aa1c170e7c17b817cbd72a06611292

See more details on using hashes here.

File details

Details for the file NRInsightsApi-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: NRInsightsApi-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for NRInsightsApi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eff67c6b7385ceb56c4469c485ecc6d849e64924bb0a47a3153c150fdd7b9d2f
MD5 6a9db075ededb4e6f4394afb3052a5d4
BLAKE2b-256 923b3f0cbf54ea957e58d3f977f00961d899285a0ca6f3d4df389817bc1f511e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page