This doc explains how to use the Partnership API to manage accounts. For child accounts, you'd use the child account object.
Requirements
Before using this API, please note:
- This API is not available to you unless your organization has been instructed by a New Relic representative to use it.
- You may not have access to using this specific object. Before using, first read the requirements.
Account object attributes
Here are the Partnership API account object's attributes.
The account API does not include an attribute to create a child account. Instead, to create child accounts, use the parent account's Account settings page in the New Relic UI.
Account API calls
Here are the URL patterns for account API functions. If using this URL pattern, send an HTTP header containing the Partner API key along with the JSON request body. For example:
GET .../api/v2/partners/:PARTNER_ID/accounts/:IDx-api-key: :PARTNER_ACCOUNT_KEYContent-Type: application/json
{ JSON data }
Call | Resource URL pattern |
---|---|
List (index) all accounts of a partner. |
|
Show the attributes of an account. |
|
Update the attributes of an account. |
|
Create an account with the given parameters. |
|
Cancel an account. |
|
Status definitions
When an account is created or listed with an API call, the account status is included automatically. Some of these statuses don't apply to all pricing models.
Account status | Definition |
---|---|
| Free account created, but primary admin is not yet activated. |
| Account created with a paid subscription, but the primary admin is not yet activated. |
| Free account, active primary admin, no application data has been collected. |
| Paid subscription, active primary admin, no application data has been collected. |
| Free subscription, receiving application data. |
| Paid subscription, receiving application data. |
| Account's subscription was upgraded. |
| Account's subscription was downgraded. |
| The New Relic account subscription has been cancelled. |
| The New Relic account has been suspended because the primary admin has not validated their email address. |
JSON example
Here is an example of a JSON request and response using the Partnership API account object.
Note that this is just an example, and that for some accounts, the users
and subscriptions
attributes are unnecessary and are ignored.
Account object API examples
Partnerships with more than 1000 accounts return a paginated response. To specify a page, add the following parameter to the query:
?page=
Here are examples of calls using the Partnership API account object. Note that these are examples, and that for some accounts, the users
and subscriptions
attributes don't apply and will be ignored.