A PHP library for the NewRelic v2 Partner API
See the documenation for the API at: https://docs.newrelic.com/docs/accounts-partnerships/partnerships/partner-api/partner-api-reference
The API takes associative arrays for objects and returns associative arrays (the actual API talks in JSON).
$api = new NewRelicPartnerAPI(123, 'aaabbbcccdddeeefffggghhh');$accounts = $api->account->getList();$account_id = 10;
$users = $api->user->getList($account_id);$account_id = 10;
$subscription_id = 1;
$details = $api->subscription->show($account_id, $subscription_id);$account_id = 10;
$user = array("users" => array(
"email" => "jsmith@gmail.com",
"password" => "testing123",
"first_name" => "John",
"last_name" => "Smith",
"owner" => true,
"role" => "admin"
));
$result = $api->user->create($account_id, $user);