• English日本語한국어
  • Log inStart now

NerdGraph tutorial: Partner and reseller subscriptions

The subscription provisioning functionality of our NerdGraph API allows you, as a New Relic partner, to create subscriptions for your accounts. And it gives you access to a more extensive range of New Relic products than the Partner API.

Requirements

  • You should not use NerdGraph to adjust your subscription provisioning unless specifically instructed by your New Relic representative.
  • Only available for Partner accounts that are on our original pricing model.

NerdGraph's provisioning functionality and the Partnership API are compatible when it comes to the products supported by both (APM, Mobile, Insights, Browser, Synthetics, and Infrastructure). If you use NerdGraph to create a subscription for any of the newer products, you'll no longer be able to update the account using the Partnership API.

Get started: endpoint and API key

For NerdGraph basics, see Introduction to NerdGraph.

The NerdGraph provisioning functionality uses a mutation called organizationProvisioningUpdatePartnerSubscription. Here's an example request making subscription changes to a specific account:

curl -v -d'{"query": "mutation { organizationProvisioningUpdatePartnerSubscription(accountId: PARTNER_ACCOUNT_ID, affectedAccountId: ACCOUNT_ID,
products: [{id: 9200, name: \"Traces\", unitsOfMeasure: [{unit: SPANS_IN_MILLIONS, quantity: 40}]}]) {enqueued errors {message path } } }"}' -H'Content-type: application/json' -H'Api-key: YOUR_USER_KEY' https://api.newrelic.com/graphql

Product subscriptions for an account

NerdGraph doesn't allow you to upgrade or downgrade individual product subscriptions for an account. Instead, the API requires you to replace (add) the configuration for all product subscriptions for the account.

Tip

If any product configurations are not included, NerdGraph automatically provisions the account with a free product (when available).

Mapping for products (productId)

With each account creation call, you must supply at least one New Relic product type. The mutation query only accepts the numeric productId for the type.

GraphQL types

NerdGraph's provisioning functionality uses the following GraphQL types:

Examples

Here are examples of an API call to create a subscription and the JSON response.

Variations from the Partnership API

These are some key differences between NerdGraph's provisioning functionality and the Partner API that frequent Partner API users should know:

Feature

Description

API keys

NerdGraph uses a .

The Partner API uses the Partnership API key.

productId and product_id

NerdGraph's product IDs are different than the ones used for the Partnership API.

Curl request format

To make a curl request to NerdGraph, the format will be different than the Partnership API:

  1. The url endpoint is different
  2. The required api key is your personal API key
  3. NerdGraph responds only to HTTP POST requests

Serverless INGESTED_EVENTS units are in millions

sending unitsOfMeasure: [{unit: INGESTED_EVENTS, quantity: 3000 } ] will be interpreted by NerdGraph as 3,000 million events.

Insights and Mobile require 2 units of measure

Insights requires DATA_RETENTION_IN_DAYS and EVENTS_IN_MILLIONS Mobile requires APPS and USERS.

Logs data retention unit of measure is determined by productID

This is specified in the product name:

  • Logs Annual Commit - 8 Days | product ID: 9110
  • Logs Annual Commit - 15 Days | product ID: 9111
  • Logs Annual Commit - 30 Days | product ID: 9112
  • Logs Monthly Commit - 8 Days | product ID: 9100
  • Logs Monthly Commit - 15 Days | product ID: 9101
  • Logs Monthly Commit - 30 Days | product ID: 9102
Copyright © 2024 New Relic Inc.

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