Skip to content

timdiels1/newrelic-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

New Relic API v2 client library for PHP

Copyright (c) 2017 Tim Diels.

Documentation

Installation

The wrapper is available on Packagist (timdiels1/newrelic-api) and can be installed using Composer:

composer require timdiels1/newrelic-api

Usage

You will need an Admin or REST API key from New Relic to use the wrapper. The wrapper can either be used by instantiating endpoints directly.

use timdiels1\NewRelicApi\NewRelic;

$baseUrl = 'https://api.newrelic.com/v2/';
$apiKey = 'thisisnotrealyouwillneedanapikey';

$client = new Newrelic($baseUrl, $apiKey);
$isAvailable = $client->isAvailable();

Endpoints

  • isAvailable()
  • getServers()

Other calls can be made by manually building a request using buildRequest and then calling it:

$response = $client->buildRequest($url, $method, $data);

About

PHP Wrapper for New Relic API v2

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages