This doc explains technical details about using the Partnership API. For an introduction and requirements, first read Intro to Partnership API.
For requirements, see Intro to Partnership API.
The Partnership API also requires that you authenticate by providing a Partner ID specific to your partnership. This is unique from the account ID for your partnership owner account.
To obtain your Partner ID, go to your partner admin console and retrieve the partner ID number that is listed in your URL:
You must include the Partner ID as part of the base URL for the Partner API.
Partner API endpoint
Resource URL patterns
To authenticate to the Partner API when making an API call:
- Add a request header labeled x-api-key and set its value to your Partner API key.
- Include your Partner ID at the specified point in the request URI.
For partners who manage New Relic accounts for their customers, the initial API call for all account-level interactions is to "create account." This call returns an xml record of the newly created account. Part of this record is the
account_id. All of the other calls in the Partnership API require the
account_id as a parameter. Provision will need to be made by the partner to parse the returned xml extract, store the
account_id, and associate it with the users' partner account record.
New Relic uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the
2xx range indicate success and codes in the
4xx range indicate an error that resulted from the provided information (for example, a required parameter was missing).
400 Bad Request
Most commonly the call is missing a required parameter.
A valid API key was not provided.
402 Request Failed
Parameters were valid but request failed for some reason.
404 Not Found
The requested item doesn't exist.
422 Unprocessable Entity
Your account has special terms and cannot be changed.