New Relic Logs API

Log data ingestion endpoints

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-mobile-application-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-synthetics-condition-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-metric-parser-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-external-service-condition-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-label-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-label-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-external-service-condition-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-metric-data-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-policy-channels-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-deployment-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-instance-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-app-summary-data-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-deployment-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-browser-application-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-app-summary-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-policy-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-instance-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-policy-channels-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-incident-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-channel-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-channel-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-label-origins-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-violation-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-app-settings-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-condition-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-deployment-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-incident-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-metric-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-metric-data-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-key-transaction-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-mobile-application-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-condition-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-label-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-policy-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-instance-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-ijkterms-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-violation-entity-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-recent-event-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-external-service-condition-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-label-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-deployment-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-nrql-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-browser-application-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-browser-application-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-channel-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-incident-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-condition-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-timeslice-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-violation-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-end-user-summary-data-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-condition-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-metric-list-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-host-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-channel-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-external-service-condition-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-channel-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-nrql-condition-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-synthetics-condition-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-policy-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-end-user-summary-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-synthetics-condition-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-host-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-browser-application-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-nrql-condition-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-key-transaction-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-metric-parser-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-nrql-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-host-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-app-settings-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-nrql-condition-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-violation-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-key-transaction-links-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-recent-event-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-synthetics-condition-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-user-defined-condition-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-user-defined-condition-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-deployment-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-nrql-condition-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-crash-summary-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-policy-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-label-response-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-application-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-label-links-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/openapi-mobile-summary-data-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/new-relic-metric-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/metric-api-common-block-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/metric-api-summary-value-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/metric-api-metric-data-object-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/metric-api-metric-data-point-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/metric-api-metric-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/metric-api-accepted-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/new-relic-event-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/event-api-success-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/event-api-custom-event-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/event-api-event-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/log-api-log-data-object-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/log-api-accepted-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/log-api-log-record-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/log-api-common-block-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/log-api-log-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/trace-api-new-relic-trace-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/trace-api-accepted-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/trace-api-common-block-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/trace-api-zipkin-span-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/trace-api-span-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/trace-api-zipkin-trace-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/json-schema/trace-api-span-batch-schema.json

Other Resources

OpenAPI Specification

new-relic-logs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: New Relic Event Alerts Logs 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: Logs
  description: Log data ingestion endpoints
paths:
  /log/v1:
    post:
      operationId: sendLogs
      summary: New Relic Send Log Data
      description: Sends one or more log records to the New Relic Log API. Accepts a JSON array of log data objects, each containing a logs array and optional common attributes. Payloads must be gzip-compressed. A single request may not exceed 1 MB compressed or 10,000 log entries.
      tags:
      - Logs
      parameters:
      - name: Content-Encoding
        in: header
        required: true
        description: Compression encoding. Gzip is required.
        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/LogPayload'
            example:
            - common:
                attributes:
                  logtype: nginx
                  service.name: myService
                  host.name: web01
              logs:
              - timestamp: 1645564509000
                message: 127.0.0.1 - - [01/Jan/2022] "GET /api/health HTTP/1.1" 200 24
                level: INFO
              - timestamp: 1645564510000
                message: 127.0.0.1 - - [01/Jan/2022] "POST /api/orders HTTP/1.1" 500 0
                level: ERROR
      responses:
        '202':
          description: Accepted. Log data was received and queued for processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
              examples:
                Sendlogs202Example:
                  summary: Default sendLogs 202 response
                  x-microcks-default: true
                  value:
                    requestId: '500123'
        '400':
          description: Bad request. Payload is malformed or missing required fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Sendlogs400Example:
                  summary: Default sendLogs 400 response
                  x-microcks-default: true
                  value:
                    requestId: '500123'
                    error: &id001
                      type: standard
                      message: Operation completed successfully
        '403':
          description: Forbidden. The API key is invalid or lacks insert permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Sendlogs403Example:
                  summary: Default sendLogs 403 response
                  x-microcks-default: true
                  value:
                    requestId: '500123'
                    error: *id001
        '413':
          description: Payload too large. Exceeds 1 MB compressed limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Sendlogs413Example:
                  summary: Default sendLogs 413 response
                  x-microcks-default: true
                  value:
                    requestId: '500123'
                    error: *id001
        '429':
          description: Too many requests. Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Sendlogs429Example:
                  summary: Default sendLogs 429 response
                  x-microcks-default: true
                  value:
                    requestId: '500123'
                    error: *id001
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    LogPayload:
      type: array
      description: Array of log data batch objects
      items:
        $ref: '#/components/schemas/LogDataObject'
    LogRecord:
      type: object
      description: A single log record
      properties:
        timestamp:
          type: integer
          description: Unix epoch timestamp in milliseconds when the log event occurred
          example: 1718153645993
        message:
          type: string
          description: The log message text
          maxLength: 32768
          example: Operation completed successfully
        level:
          type: string
          description: Log severity level
          enum:
          - FATAL
          - ERROR
          - WARN
          - WARNING
          - INFO
          - DEBUG
          - TRACE
          example: FATAL
        logtype:
          type: string
          description: Log format type for automatic parsing (e.g., nginx, apache, syslog)
          example: standard
        attributes:
          type: object
          description: Additional key-value attributes for this log record
          additionalProperties:
            oneOf:
            - type: string
            - type: number
            - type: boolean
          example:
            customAttribute: example_value
      additionalProperties:
        description: Additional top-level attributes are accepted and stored
    CommonBlock:
      type: object
      description: Shared attributes applied to all log records in this batch
      properties:
        timestamp:
          type: integer
          description: Default Unix timestamp in milliseconds for all logs in the batch
          example: 1718153645993
        attributes:
          type: object
          description: Key-value attributes applied to all logs in this batch
          additionalProperties:
            oneOf:
            - type: string
            - type: number
            - type: boolean
          example:
            customAttribute: example_value
    LogDataObject:
      type: object
      description: A batch of log records with optional shared attributes
      required:
      - logs
      properties:
        common:
          $ref: '#/components/schemas/CommonBlock'
        logs:
          type: array
          description: Array of individual log records
          items:
            $ref: '#/components/schemas/LogRecord'
          example:
          - timestamp: 1718153645993
            message: Operation completed successfully
            level: FATAL
            logtype: standard
            attributes:
              customAttribute: example_value
    ErrorResponse:
      type: object
      description: Error response
      properties:
        requestId:
          type: string
          example: '500123'
        error:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
          example:
            type: standard
            message: Operation completed successfully
    AcceptedResponse:
      type: object
      description: Response when the payload was accepted
      properties:
        requestId:
          type: string
          description: Unique identifier for the accepted ingestion request
          example: '500123'
  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/