• /
  • EnglishEspañol日本語한국어Português
  • Log inStart now

List application ID, host ID, instance ID

New Relic's APM assigns IDs to entities related to an application. These are used to collect information about the operation and performance from different view points. These IDs can be returned via New Relic's REST API.

The IDs may include:

  • Application ID $APP_ID for each instrumented app
  • Host ID $HOST_ID for each host
  • Instance ID $INSTANCE_ID if there are multiple instances of the app

To list any of these IDs in the New Relic API Explorer, you need an API key.

Use the API Explorer

  1. Go to the API Explorer.
  2. From the Servers dropdown, choose a US or EU-based API URL.
  3. Click Authorize, enter your user API key, and click Authorize again.
  4. Expand one of the available API functions: GET, PUT, DELETE.
  5. (Optional) Add Parameters values for your API call to filter the response (refer to the UI for descriptions and requirements for v2.)
  6. From the Media type dropdown, choose a format for your request: JSON or XML.
  7. Click Try it out, then Execute.

List product IDs

To return a list of all product IDs for a particular product:

  1. Click the GET /applications.json dropdown.
  2. Click Try it out, then Execute.
  3. Browse the response to view all product IDs.

Once you've located a specific product ID, copy it for later in your other REST API calls.

List application IDs

Each app monitored by an agent is assigned a name. A unique $APP_ID is also associated with that name. The $APP_ID is fundamental for retrieving information about your apps. For more information about listing and using the $APP_ID, and obtaining the summary data, see Listing your app ID.

List host IDs

The $HOST_ID is used to get APM data for a specific host running an app. A physical server may have more than one host. For example, a web server program running on a physical server may be configured to have more than one virtual host.

IDs for the host and physical server are not the same. Each host ID is unique and represents different items.

Use the $HOST_ID to retrieve summary metrics for the host as well as specific metric timeslice values. For more information about available metrics:

  1. Go to rpm.newrelic.com.
  2. Go to the API Explorer, then select your account name from the Select an account dropdown.
  3. Go to the API Explorer's Application host page at rpm.newrelic.com/api/explore/application_hosts/names.

List instance IDs

The instance ID meaning depends on the New Relic language agent being used. You can list this ID from the REST API. For Java, you can also view the instance ID (JVM) from APM's Overview page.

Agent

Instance ID represents

Go

The Go program on the host reporting to the app name

Java

A Java Virtual Machine (JVM)

.NET

For the agent for .NET Framework, this is the AppDomain

Node.js

A worker process

PHP

The daemon agent

Ruby

An individual Ruby worker process

Python

The master and worker processes

You can retrieve summary metrics for the instance as well as specific metric timeslice values using the {INSTANCE_ID}. For details about available metrics, use the REST API Explorer Application Instance page.

REST API application list example

The following example shows how to locate all the ID information for an application by using the APP_ID. If you have an EU account, the endpoint begins with https://api.eu.newrelic.com.

curl -X GET 'https://api.newrelic.com/v2/applications.json' \
     -H "Api-Key:$API_KEY" -i \
     -d 'filter[ids]=1441'    <----<<<< {APP_ID}

The resulting example output is running on five servers. One server is hosting two virtual hosts for a total of six hosts. The output includes a links section listing the application_instances and application_hosts for the application.

{
"applications": [
{
"id": 1441, <----<<<< {APP_ID}
"name": "RPM Combined Production",
"language": "ruby",
"health_status": "green",
"reporting": true,
"last_reported_at": "2015-11-10T23:19:47+00:00",
"application_summary": {
. . .
},
"end_user_summary": {
. . .
},
"settings": {
. . .
},
"links": {
"application_instances": [ <---<<<< {INSTANCE_ID} list
21790,
24810,
27948,
35120,
35121,
35122,
186288,
247253,
247254,
247255,
247256
],
"application_hosts": [ <---<<<< {HOST_ID} list
21788,
24808,
34966,
186283,
247245,
286551
]
}
}
],
. . .
Copyright © 2024 New Relic Inc.

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