• Log in

Partnership API account object

This doc explains how to use the Partnership API to manage accounts. For child accounts, you'd use the child account object.

Requirements

The Partnership API is not available to your organization unless you're specifically instructed by your New Relic representative that you should use it.

You may not be able to use some aspects of this 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/:ID
x-api-key: :PARTNER_ACCOUNT_KEY
Content-Type: application/json

{ JSON data }

Call

Resource URL pattern

List (index) all accounts of a partner.

GET /api/v2/partners/PARTNER_ID/accounts

Show the attributes of an account.

GET /api/v2/partners/PARTNER_ID/accounts/:ID

Update the attributes of an account.

PUT /api/v2/partners/PARTNER_ID/accounts/:ID

Create an account with the given parameters.

POST /api/v2/partners/PARTNER_ID/accounts

Cancel an account.

DELETE /api/v2/partners/PARTNER_ID/accounts/:ID

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

pending

Free account created, but primary admin is not yet activated.

paid_pending

Account created with a paid subscription, but the primary admin is not yet activated.

new

Free account, active primary admin, no application data has been collected.

paid_new

Paid subscription, active primary admin, no application data has been collected.

active

Free subscription, receiving application data.

paid_active

Paid subscription, receiving application data.

upgraded

Account's subscription was upgraded.

downgraded

Account's subscription was downgraded.

cancelled

The New Relic account subscription has been cancelled.

suspended

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.

Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.