openapi: 3.1.0 info: title: New Relic Event Alerts Metrics API description: The New Relic Event API allows you to send custom event data to the New Relic platform via HTTP POST. Custom events submitted through this API can be queried and visualized using NRQL, making it suitable for tracking arbitrary business or application events. Each event is a JSON object with an eventType and any number of additional attribute key-value pairs. version: '1' contact: name: New Relic Support url: https://support.newrelic.com/ termsOfService: https://newrelic.com/termsandconditions/terms x-last-validated: '2026-04-18' servers: - url: https://insights-collector.newrelic.com description: US Production - url: https://insights-collector.eu01.nr-data.net description: EU Production security: - apiKey: [] tags: - name: Metrics description: Metric data ingestion endpoints paths: /metric/v1: post: operationId: sendMetrics summary: New Relic Send Metric Data description: Sends an array of metric data points to the New Relic Metric API. The request body must be a JSON array of metric data objects, each containing a metrics array and optional common attributes. Payloads should be gzip-compressed for best performance. The API supports count, gauge, and summary metric types. tags: - Metrics parameters: - $ref: '#/components/parameters/ApiKey' - name: Content-Encoding in: header description: Compression encoding. Use gzip for compressed payloads. schema: type: string enum: - gzip example: gzip - name: Content-Type in: header required: true schema: type: string enum: - application/json example: application/json requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MetricPayload' example: - common: timestamp: 1531414060739 interval.ms: 10000 attributes: host.name: host1 service.name: myService metrics: - name: cpu.usage.percent type: gauge value: 12.3 - name: http.requests type: count value: 420 interval.ms: 10000 responses: '202': description: Accepted. The data was received and queued for processing. content: application/json: schema: $ref: '#/components/schemas/AcceptedResponse' examples: Sendmetrics202Example: summary: Default sendMetrics 202 response x-microcks-default: true value: requestId: '500123' '400': description: Bad request. The payload is malformed or exceeds size limits. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Sendmetrics400Example: summary: Default sendMetrics 400 response x-microcks-default: true value: error: &id001 type: standard message: Operation completed successfully failures: &id002 - error: message: Operation completed successfully failed: - {} '403': description: Forbidden. The API key is invalid or does not have insert permissions. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Sendmetrics403Example: summary: Default sendMetrics 403 response x-microcks-default: true value: error: *id001 failures: *id002 '413': description: Payload too large. The request body exceeds the 1 MB limit. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Sendmetrics413Example: summary: Default sendMetrics 413 response x-microcks-default: true value: error: *id001 failures: *id002 '429': description: Too many requests. The rate limit has been exceeded. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Sendmetrics429Example: summary: Default sendMetrics 429 response x-microcks-default: true value: error: *id001 failures: *id002 x-microcks-operation: delay: 0 dispatcher: FALLBACK /applications/{application_id}/hosts/{host_id}/metrics.json: get: tags: - Metrics summary: New Relic Get Applications Hosts Host Metrics description: This API operation retrieves a list of metric names associated with a specific host within a given application in New Relic's Application Performance Monitoring (APM) system. By providing both an application ID and a host in the endpoint path, users can query the available metrics that New Relic is collecting for that particular host instance. The response returns metric name data in JSON format, which typically includes identifiers and metadata for various performance measurements such as CPU usage, memory consumption, throughput, response times, and other application-specific metrics. This endpoint is particularly useful for developers and operations teams who need to discover what metrics are available before constructing more detailed queries or building monitoring dashboards, allowing them to programmatically explore the monitoring data structure for their infrastructure. parameters: - name: application_id in: path description: Application ID required: true schema: type: integer example: 100 - name: host_id in: path description: Application Host ID required: true schema: type: integer example: 100 - name: name in: query description: Filter metrics by name schema: type: string example: example-resource-01 - name: page in: query description: Pagination index (will be deprecated) schema: type: integer example: 100 - name: cursor in: query description: Cursor for next page (replacing page param) schema: type: string example: example_string responses: '200': description: No response was specified headers: link: description: 'Links to related resources, in the format defined by [RFC 5988](https://tools.ietf.org/html/rfc5988#section-5). This will include a link with relation type `next` to the next page and `last` to the last page, unless this page is itself the last page. ' schema: type: array items: type: string content: application/json: schema: $ref: '#/components/schemas/MetricListResponse' examples: Getapplicationsidhostshostidmetrics200Example: summary: Default getApplicationsIdHostsHostIdMetrics 200 response x-microcks-default: true value: metrics: &id003 - name: example-resource-01 values: - {} application/xml: schema: $ref: '#/components/schemas/MetricListResponse' examples: Getapplicationsidhostshostidmetrics200Example: summary: Default getApplicationsIdHostsHostIdMetrics 200 response x-microcks-default: true value: metrics: *id003 x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getApplicationsIdHostsHostIdMetrics x-microcks-operation: delay: 0 dispatcher: FALLBACK /applications/{application_id}/hosts/{host_id}/metrics/data.json: get: tags: - Metrics summary: New Relic Get Applications Hosts Host Metrics Data description: This API operation retrieves metric data for a specific host associated with a particular application in New Relic. By making a GET request to the endpoint with the application and host as path parameters, users can access detailed performance metrics and monitoring data for that specific host instance. The operation returns data in JSON format, which typically includes time-series metric values such as response times, throughput, error rates, and other performance indicators collected by New Relic's monitoring agents. Additional query parameters can be used to filter the metrics by name, specify time ranges, set data summarization options, and control the granularity of the returned data, making it useful for building custom dashboards, generating reports, or integrating New Relic monitoring data into external systems and workflows. parameters: - name: application_id in: path description: Application ID required: true schema: type: integer example: 100 - name: host_id in: path description: Application Host ID required: true schema: type: integer example: 100 - name: names in: query description: Retrieve specific metrics by name required: true style: form explode: false schema: type: array items: type: string example: - example_string - name: values in: query description: Retrieve specific metric values style: form explode: false schema: type: array items: type: string example: - example_string - name: from in: query description: Retrieve metrics after this time schema: type: string format: date-time example: '2026-04-18T14:30:00Z' - name: to in: query description: Retrieve metrics before this time schema: type: string format: date-time example: '2026-04-18T14:30:00Z' - name: period in: query description: Period of timeslices in seconds schema: type: integer example: 100 - name: summarize in: query description: Summarize the data schema: type: boolean example: true - name: raw in: query description: Return unformatted raw values schema: type: boolean example: true responses: '200': description: No response was specified content: application/json: schema: $ref: '#/components/schemas/MetricDataResponse' examples: Getapplicationsidhostshostidmetricsdata200Example: summary: Default getApplicationsIdHostsHostIdMetricsData 200 response x-microcks-default: true value: metric_data: from: {} metrics: {} metrics_found: {} metrics_not_found: {} to: {} application/xml: schema: $ref: '#/components/schemas/MetricDataResponse' examples: Getapplicationsidhostshostidmetricsdata200Example: summary: Default getApplicationsIdHostsHostIdMetricsData 200 response x-microcks-default: true value: metric_data: from: {} metrics: {} metrics_found: {} metrics_not_found: {} to: {} x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getApplicationsIdHostsHostIdMetricsData x-microcks-operation: delay: 0 dispatcher: FALLBACK /applications/{application_id}/instances/{instance_id}/metrics.json: get: tags: - Metrics summary: New Relic Get Applications Instances Instance Metrics description: '
Return a list of known metrics and their value names for the given resource.
See our documentation for a discussion on output pagination and for examples of requesting and using metric values.
' parameters: - name: application_id in: path description: Application ID required: true schema: type: integer example: 100 - name: instance_id in: path description: Application Instance ID required: true schema: type: integer example: 100 - name: name in: query description: Filter metrics by name schema: type: string example: example-resource-01 - name: page in: query description: Pagination index (will be deprecated) schema: type: integer example: 100 - name: cursor in: query description: Cursor for next page (replacing page param) schema: type: string example: example_string responses: '200': description: No response was specified headers: link: description: 'Links to related resources, in the format defined by [RFC 5988](https://tools.ietf.org/html/rfc5988#section-5). This will include a link with relation type `next` to the next page and `last` to the last page, unless this page is itself the last page. ' schema: type: array items: type: string content: application/json: schema: $ref: '#/components/schemas/MetricParserResponse' examples: Getapplicationsidinstancesinstanceidmetrics200Example: summary: Default getApplicationsIdInstancesInstanceIdMetrics 200 response x-microcks-default: true value: metric: name: {} values: {} application/xml: schema: $ref: '#/components/schemas/MetricParserResponse' examples: Getapplicationsidinstancesinstanceidmetrics200Example: summary: Default getApplicationsIdInstancesInstanceIdMetrics 200 response x-microcks-default: true value: metric: name: {} values: {} x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getApplicationsIdInstancesInstanceIdMetrics x-microcks-operation: delay: 0 dispatcher: FALLBACK /applications/{application_id}/instances/{instance_id}/metrics/data.json: get: tags: - Metrics summary: New Relic Get Applications Instances Instance Metrics Data description: 'This API endpoint returns a list of values for each of the requested metrics. The list of available metrics can be returned using the Metric Name API endpoint.
Metric data can be filtered by a number of parameters, including multiple names and values, and by time range. Metric names and values will be matched intelligently in the background.
You can also retrieve a summarized data point across the entire time range selected by using the summarize parameter.
See our documentation for a discussion on output pagination, time range related considerations, and for examples of requesting and using metric values.
' parameters: - name: application_id in: path description: Application ID required: true schema: type: integer example: 100 - name: instance_id in: path description: Application Instance ID required: true schema: type: integer example: 100 - name: names in: query description: Retrieve specific metrics by name required: true style: form explode: false schema: type: array items: type: string example: - example_string - name: values in: query description: Retrieve specific metric values style: form explode: false schema: type: array items: type: string example: - example_string - name: from in: query description: Retrieve metrics after this time schema: type: string format: date-time example: '2026-04-18T14:30:00Z' - name: to in: query description: Retrieve metrics before this time schema: type: string format: date-time example: '2026-04-18T14:30:00Z' - name: period in: query description: Period of timeslices in seconds schema: type: integer example: 100 - name: summarize in: query description: Summarize the data schema: type: boolean example: true - name: raw in: query description: Return unformatted raw values schema: type: boolean example: true responses: '200': description: No response was specified content: application/json: schema: $ref: '#/components/schemas/MetricDataResponse' examples: Getapplicationsidinstancesinstanceidmetricsdata200Example: summary: Default getApplicationsIdInstancesInstanceIdMetricsData 200 response x-microcks-default: true value: metric_data: from: {} metrics: {} metrics_found: {} metrics_not_found: {} to: {} application/xml: schema: $ref: '#/components/schemas/MetricDataResponse' examples: Getapplicationsidinstancesinstanceidmetricsdata200Example: summary: Default getApplicationsIdInstancesInstanceIdMetricsData 200 response x-microcks-default: true value: metric_data: from: {} metrics: {} metrics_found: {} metrics_not_found: {} to: {} x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getApplicationsIdInstancesInstanceIdMetricsData x-microcks-operation: delay: 0 dispatcher: FALLBACK /applications/{application_id}/metrics.json: get: tags: - Metrics summary: New Relic Get Applications Metrics description: 'Return a list of known metrics and their value names for the given resource.
See our documentation for a discussion on output pagination and for examples of requesting and using metric values.
' parameters: - name: application_id in: path description: Application ID required: true schema: type: integer example: 100 - name: name in: query description: Filter metrics by name schema: type: string example: example-resource-01 - name: page in: query description: Pagination index (will be deprecated) schema: type: integer example: 100 - name: cursor in: query description: Cursor for next page (replacing page param) schema: type: string example: example_string responses: '200': description: No response was specified headers: link: description: 'Links to related resources, in the format defined by [RFC 5988](https://tools.ietf.org/html/rfc5988#section-5). This will include a link with relation type `next` to the next page and `last` to the last page, unless this page is itself the last page. ' schema: type: array items: type: string content: application/json: schema: $ref: '#/components/schemas/MetricParserResponse' examples: Getapplicationsidmetrics200Example: summary: Default getApplicationsIdMetrics 200 response x-microcks-default: true value: metric: name: {} values: {} application/xml: schema: $ref: '#/components/schemas/MetricParserResponse' examples: Getapplicationsidmetrics200Example: summary: Default getApplicationsIdMetrics 200 response x-microcks-default: true value: metric: name: {} values: {} x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getApplicationsIdMetrics x-microcks-operation: delay: 0 dispatcher: FALLBACK /applications/{application_id}/metrics/data.json: get: tags: - Metrics summary: New Relic Get Applications Metrics Data description: 'This API endpoint returns a list of values for each of the requested metrics. The list of available metrics can be returned using the Metric Name API endpoint.
Metric data can be filtered by a number of parameters, including multiple names and values, and by time range. Metric names and values will be matched intelligently in the background.
You can also retrieve a summarized data point across the entire time range selected by using the summarize parameter.
See our documentation for a discussion on output pagination, time range related considerations, and for examples of requesting and using metric values.
' parameters: - name: application_id in: path description: Application ID required: true schema: type: integer example: 100 - name: names in: query description: Retrieve specific metrics by name required: true style: form explode: false schema: type: array items: type: string example: - example_string - name: values in: query description: Retrieve specific metric values style: form explode: false schema: type: array items: type: string example: - example_string - name: from in: query description: Retrieve metrics after this time schema: type: string format: date-time example: '2026-04-18T14:30:00Z' - name: to in: query description: Retrieve metrics before this time schema: type: string format: date-time example: '2026-04-18T14:30:00Z' - name: period in: query description: Period of timeslices in seconds schema: type: integer example: 100 - name: summarize in: query description: Summarize the data schema: type: boolean example: true - name: raw in: query description: Return unformatted raw values schema: type: boolean example: true responses: '200': description: No response was specified content: application/json: schema: $ref: '#/components/schemas/MetricDataResponse' examples: Getapplicationsidmetricsdata200Example: summary: Default getApplicationsIdMetricsData 200 response x-microcks-default: true value: metric_data: from: {} metrics: {} metrics_found: {} metrics_not_found: {} to: {} application/xml: schema: $ref: '#/components/schemas/MetricDataResponse' examples: Getapplicationsidmetricsdata200Example: summary: Default getApplicationsIdMetricsData 200 response x-microcks-default: true value: metric_data: from: {} metrics: {} metrics_found: {} metrics_not_found: {} to: {} x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getApplicationsIdMetricsData x-microcks-operation: delay: 0 dispatcher: FALLBACK /mobile_applications/{mobile_application_id}/metrics.json: get: tags: - Metrics summary: New Relic Get Mobile Applications Mobile Application Metrics description: 'Return a list of known metrics and their value names for the given resource.
See our documentation for a discussion on output pagination and for examples of requesting and using metric values.
' parameters: - name: mobile_application_id in: path description: Mobile application ID required: true schema: type: integer example: 100 - name: name in: query description: Filter metrics by name schema: type: string example: example-resource-01 - name: page in: query description: Pagination index (will be deprecated) schema: type: integer example: 100 - name: cursor in: query description: Cursor for next page (replacing page param) schema: type: string example: example_string responses: '200': description: No response was specified headers: link: description: 'Links to related resources, in the format defined by [RFC 5988](https://tools.ietf.org/html/rfc5988#section-5). This will include a link with relation type `next` to the next page and `last` to the last page, unless this page is itself the last page. ' schema: type: array items: type: string content: application/json: schema: $ref: '#/components/schemas/MetricParserResponse' examples: Getmobileapplicationsmobileapplicationidmetrics200Example: summary: Default getMobileApplicationsMobileApplicationIdMetrics 200 response x-microcks-default: true value: metric: name: {} values: {} application/xml: schema: $ref: '#/components/schemas/MetricParserResponse' examples: Getmobileapplicationsmobileapplicationidmetrics200Example: summary: Default getMobileApplicationsMobileApplicationIdMetrics 200 response x-microcks-default: true value: metric: name: {} values: {} x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getMobileApplicationsMobileApplicationIdMetrics x-microcks-operation: delay: 0 dispatcher: FALLBACK /mobile_applications/{mobile_application_id}/metrics/data.json: get: tags: - Metrics summary: New Relic Get Mobile Applications Mobile Application Metrics Data description: 'This API endpoint returns a list of values for each of the requested metrics. The list of available metrics can be returned using the Metric Name API endpoint.
Metric data can be filtered by a number of parameters, including multiple names and values, and by time range. Metric names and values will be matched intelligently in the background.
You can also retrieve a summarized data point across the entire time range selected by using the summarize parameter.
See our documentation for a discussion on output pagination, time range related considerations, and for examples of requesting and using metric values.
' parameters: - name: mobile_application_id in: path description: Mobile application ID required: true schema: type: integer example: 100 - name: names in: query description: Retrieve specific metrics by name required: true style: form explode: false schema: type: array items: type: string example: - example_string - name: values in: query description: Retrieve specific metric values style: form explode: false schema: type: array items: type: string example: - example_string - name: from in: query description: Retrieve metrics after this time schema: type: string format: date-time example: '2026-04-18T14:30:00Z' - name: to in: query description: Retrieve metrics before this time schema: type: string format: date-time example: '2026-04-18T14:30:00Z' - name: period in: query description: Period of timeslices in seconds schema: type: integer example: 100 - name: summarize in: query description: Summarize the data schema: type: boolean example: true - name: raw in: query description: Return unformatted raw values schema: type: boolean example: true responses: '200': description: No response was specified content: application/json: schema: $ref: '#/components/schemas/MetricDataResponse' examples: Getmobileapplicationsmobileapplicationidmetricsdata200Example: summary: Default getMobileApplicationsMobileApplicationIdMetricsData 200 response x-microcks-default: true value: metric_data: from: {} metrics: {} metrics_found: {} metrics_not_found: {} to: {} application/xml: schema: $ref: '#/components/schemas/MetricDataResponse' examples: Getmobileapplicationsmobileapplicationidmetricsdata200Example: summary: Default getMobileApplicationsMobileApplicationIdMetricsData 200 response x-microcks-default: true value: metric_data: from: {} metrics: {} metrics_found: {} metrics_not_found: {} to: {} x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true GenerateOperationSummariesFromPath: true ChooseTags: true operationId: getMobileApplicationsMobileApplicationIdMetricsData x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: MetricParserResponseType: type: object properties: name: type: string example: example-resource-01 values: type: array items: type: string example: - example_string MetricListResponse: type: object properties: metrics: type: array items: $ref: '#/components/schemas/MetricParserResponseType' example: - name: example-resource-01 values: - {} MetricPayload: type: array description: An array of metric data objects to be ingested items: $ref: '#/components/schemas/MetricDataObject' TimesliceResponse: type: object properties: from: type: string format: date-time example: '2026-04-18T14:30:00Z' to: type: string format: date-time example: '2026-04-18T14:30:00Z' values: type: object properties: {} example: {} MetricDataResponseType: type: object properties: from: type: string format: date-time example: '2026-04-18T14:30:00Z' metrics: type: array items: $ref: '#/components/schemas/MetricResponse' example: - name: example-resource-01 timeslices: - {} metrics_found: type: string example: example_string metrics_not_found: type: string example: example_string to: type: string format: date-time example: '2026-04-18T14:30:00Z' SummaryValue: type: object description: Summary metric value containing statistical aggregations required: - count - sum - min - max properties: count: type: number description: The number of measurements in this summary example: 42.5 sum: type: number description: The sum of all measurement values example: 42.5 min: type: number description: The minimum measurement value example: 42.5 max: type: number description: The maximum measurement value example: 42.5 CommonBlock: type: object description: Shared attributes applied to all metrics in this data object unless overridden at the metric level properties: timestamp: type: integer description: Unix timestamp in milliseconds for all metrics in this batch example: 1718153645993 interval.ms: type: integer description: Default measurement interval in milliseconds for count and summary metrics example: 100 attributes: type: object description: Key-value pairs applied to all metrics in the batch. Values can be strings, numbers, or booleans. additionalProperties: oneOf: - type: string - type: number - type: boolean example: customAttribute: example_value MetricResponse: type: object properties: name: type: string example: example-resource-01 timeslices: type: array items: $ref: '#/components/schemas/TimesliceResponse' example: - from: '2026-04-18T14:30:00Z' to: '2026-04-18T14:30:00Z' values: {} MetricDataPoint: type: object description: A single metric data point required: - name - type - value properties: name: type: string description: The metric name (e.g., cpu.usage.percent) maxLength: 255 example: example-resource-01 type: type: string description: The metric type enum: - gauge - count - summary example: gauge value: description: The metric value. For gauge and count, a number. For summary, an object with count, sum, min, and max fields. oneOf: - type: number - $ref: '#/components/schemas/SummaryValue' example: 42.5 timestamp: type: integer description: Unix timestamp in milliseconds. Overrides the common timestamp for this metric. example: 1718153645993 interval.ms: type: integer description: Measurement interval in milliseconds. Required for count and summary types. example: 100 attributes: type: object description: Additional key-value attributes for this metric point additionalProperties: oneOf: - type: string - type: number - type: boolean example: customAttribute: example_value ErrorResponse: type: object description: Error response body properties: error: type: object properties: type: type: string description: Error type identifier message: type: string description: Human-readable error description example: type: standard message: Operation completed successfully failures: type: array description: List of individual failure details when partial rejection occurs items: type: object properties: error: type: object properties: message: type: string failed: type: array items: type: object example: - error: message: Operation completed successfully failed: - {} MetricParserResponse: type: object properties: metric: $ref: '#/components/schemas/MetricParserResponseType' MetricDataObject: type: object description: A container for a batch of metrics with optional shared attributes properties: common: $ref: '#/components/schemas/CommonBlock' metrics: type: array description: Array of individual metric data points items: $ref: '#/components/schemas/MetricDataPoint' example: - name: example-resource-01 type: gauge value: 42.5 timestamp: 1718153645993 interval.ms: 100 attributes: customAttribute: example_value required: - metrics AcceptedResponse: type: object description: Response returned when the payload was accepted properties: requestId: type: string description: Unique identifier for the accepted request example: '500123' MetricDataResponse: type: object properties: metric_data: $ref: '#/components/schemas/MetricDataResponseType' parameters: ApiKey: name: Api-Key in: header required: true description: New Relic License Key or Ingest API Key with Insert permissions schema: type: string securitySchemes: apiKey: type: apiKey in: header name: Api-Key description: New Relic License Key or Ingest API Key externalDocs: description: New Relic Event API Documentation url: https://docs.newrelic.com/docs/data-apis/ingest-apis/event-api/introduction-event-api/