New Relic Policies API

The Policies API from New Relic — 8 operation(s) for policies.

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-policies-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: New Relic Event Alerts Policies 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: Policies
paths:
  /alerts_conditions/policies/{policy_id}.json:
    post:
      tags:
      - Policies
      summary: New Relic Post Alerts Conditions Policies
      description: "🔥🔥 New users should use <a href=\"https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-nerdgraph/nerdgraph-api-examples/\">these docs about managing alerts via NerdGraph.</a>\n\n<p>This API endpoint allows you to create APM Application and Key Transaction, Browser and Mobile application metric conditions for your alert policies.</p>\n\n<p><strong>Conditions for web transaction percentiles, or conditions targeting labels (dynamic targeting), are not available.</strong></p>\n\n<p>Note: <a href=\"https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/rest-api-key\">Admin User’s API Key</a> is required.</p>\n\n<p>See our documentation for a discussion on <a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#conditions-create\" target=\"_blank\">creating conditions for policies</a>.\n<br /></p>\n\n<p>All fields are required except for “runbook_urlâ€\x9D, “enabledâ€\x9D (defaults to false), “user_definedâ€\x9D.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#type\" target=\"_blank\">type</a>: apm_app_metric, apm_kt_metric, servers_metric, browser_metric, mobile_metric.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#name\" target=\"_blank\">name</a>: A title for your condition.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#enabled\" target=\"_blank\">enabled</a>: The status of your condition (optional).</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#entities\" target=\"_blank\">entities</a>: An array of instances associated with your condition.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#metric\" target=\"_blank\">metric</a>: The metric field accepts parameters based on the condition <b>type</b> selected as follows:</p>\n\n<p>  When <b>apm_app_metric</b>: apdex, error_percentage, response_time_web, response_time_background, throughput_web, throughput_background, user_defined.</p>\n\n<p>  When <b>apm_kt_metric</b>: apdex, error_percentage, error_count, response_time, throughput.</p>\n\n<p>  When <b>servers_metric</b>: cpu_percentage, disk_io_percentage, memory_percentage, fullest_disk_percentage, load_average_one_minute, user_defined.</p>\n\n<p>  When <b>browser_metric</b>: end_user_apdex, total_page_load, page_rendering, web_application, network, dom_processing, request_queuing, ajax_response_time, page_views_with_js_errors, page_view_throughput, ajax_throughput, user_defined.</p>\n\n<p>  When <b>mobile_metric</b>: database, images, json, network, view_loading, network_error_percentage, status_error_percentage, mobile_crash_rate, user_defined.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/rest-api-alerts/new-relic-alerts-rest-api/alerts-conditions-api-field-names#condition-scope\">condition_scope</a>: Set to either <code>instance</code> to target a Java application instance or <code>application</code> for a Java app.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/rest-api-alerts/new-relic-alerts-rest-api/alerts-conditions-api-field-names#violation_close_timer\">violation_close_timer</a> (in hours): 1, 2, 4, 8, 12, 24. Duration after which instance-based (including JVM health metric) violations will automatically close.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#runbook_url\" target=\"_blank\">runbook_url</a>: Runbook URL to display in notifications (optional).</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_duration\" target=\"_blank\">terms[duration]</a> (in minutes): 5, 10, 15, 30, 60, 120.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_operator\" target=\"_blank\">terms[operator]</a>: above, below, equal.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_priority\" target=\"_blank\">terms[priority]</a>: critical, warning.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_threshold\" target=\"_blank\">terms[threshold]</a>: Must be 0 or greater.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_time_function\" target=\"_blank\">terms[time_function]</a>: all, any.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#user_defined_metric\" target=\"_blank\">user_defined[metric]</a>: A custom metric to be evaluated.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#user_defined_value_function\" target=\"_blank\">user_defined[value_function]</a>: average, min, max, total, sample_size.</p>\n\n"
      parameters:
      - name: policy_id
        in: path
        description: Alerts policy
        required: true
        schema:
          type: integer
        example: 100
      requestBody:
        description: Condition schema
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Condition'
            examples:
              PostalertsconditionspoliciespolicyidRequestExample:
                summary: Default postAlertsConditionsPoliciesPolicyId request
                x-microcks-default: true
                value:
                  condition:
                    condition_scope: example_value
                    enabled: true
                    entities:
                    - {}
                    gc_metric: example_value
                    metric: example_value
                    name: Example Title
                    terms:
                    - {}
                    type: example_value
                    violation_close_timer: 10
          application/xml:
            schema:
              $ref: '#/components/schemas/Condition'
            examples:
              PostalertsconditionspoliciespolicyidRequestExample:
                summary: Default postAlertsConditionsPoliciesPolicyId request
                x-microcks-default: true
                value:
                  condition:
                    condition_scope: example_value
                    enabled: true
                    entities:
                    - {}
                    gc_metric: example_value
                    metric: example_value
                    name: Example Title
                    terms:
                    - {}
                    type: example_value
                    violation_close_timer: 10
        required: true
      responses:
        '200':
          description: No response was specified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConditionResponse'
              examples:
                Postalertsconditionspoliciespolicyid200Example:
                  summary: Default postAlertsConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                    condition:
                      condition_scope: {}
                      enabled: {}
                      entities: {}
                      gc_metric: {}
                      id: {}
                      metric: {}
                      name: {}
                      runbook_url: {}
                      terms: {}
                      type: {}
                      user_defined: {}
                      violation_close_timer: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/ConditionResponse'
              examples:
                Postalertsconditionspoliciespolicyid200Example:
                  summary: Default postAlertsConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                    condition:
                      condition_scope: {}
                      enabled: {}
                      entities: {}
                      gc_metric: {}
                      id: {}
                      metric: {}
                      name: {}
                      runbook_url: {}
                      terms: {}
                      type: {}
                      user_defined: {}
                      violation_close_timer: {}
      x-codegen-request-body-name: condition
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        GenerateOperationSummariesFromPath: true
        ChooseTags: true
      operationId: postAlertsConditionsPoliciesPolicyId
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /alerts_external_service_conditions/policies/{policy_id}.json:
    post:
      tags:
      - Policies
      summary: New Relic Post Alerts External Service Conditions Policies
      description: "🔥🔥 New users should use NRQL Alert Conditions, refer to <a href=\"https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-nerdgraph/nerdgraph-api-examples/\">these docs about managing alerts via NerdGraph.</a>\n\n<p>This API endpoint allows you to create external service conditions for your alert policies.</p>\n\n<p>Note: <a href=\"https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/rest-api-key\">Admin User’s API Key</a> is required.</p>\n\n<p>See our documentation for a discussion on <a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#ext-conditions-create\" target=\"_blank\">creating conditions for external services</a>.</p>\n\n<p>All fields are required except for “runbook_urlâ€\x9D, “enabledâ€\x9D (defaults to false).</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#type\" target=\"_blank\">type</a>: apm_external_service, mobile_external_service.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#name\" target=\"_blank\">name</a>: A title for your condition.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#enabled\" target=\"_blank\">enabled</a>: The status of your condition (optional).</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#entities\" target=\"_blank\">entities</a>: An array of instance IDs associated with your condition.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#external_service_url\" target=\"_blank\">external_service_url</a>: The URL of the external service. Must not include protocol (“example.comâ€\x9D, not “https://example.comâ€\x9D)</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#metric\" target=\"_blank\">metric</a>: The metric field accepts parameters based on the condition <b>type</b> selected as follows:</p>\n\n<p>  When <b>apm_external_service</b>: response_time_average, response_time_minimum, response_time_maximum, throughput.</p>\n\n<p>  When <b>mobile_external_service</b>: response_time_average, response_time_minimum, response_time_maximum, throughput, network_failure_percentage, http_status_error_percentage.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#runbook_url\" target=\"_blank\">runbook_url</a>: Runbook URL to display in notifications (optional).</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_duration\" target=\"_blank\">terms[duration]</a> (in minutes): 5, 10, 15, 30, 60, 120.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_operator\" target=\"_blank\">terms[operator]</a>: above, below, equal.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_priority\" target=\"_blank\">terms[priority]</a>: critical, warning.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_threshold\" target=\"_blank\">terms[threshold]</a>: Must be 0 or greater.</p>\n\n<p><a href=\"https://docs.newrelic.com/docs/alerts/new-relic-alerts/rest-api-alerts/alerts-conditions-api-field-names#terms_time_function\" target=\"_blank\">terms[time_function]</a>: all, any.</p>\n\n"
      parameters:
      - name: policy_id
        in: path
        description: Alerts policy ID
        required: true
        schema:
          type: integer
        example: 100
      requestBody:
        description: Condition schema
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalServiceCondition'
            examples:
              PostalertsexternalserviceconditionspoliciespolicyidRequestExample:
                summary: Default postAlertsExternalServiceConditionsPoliciesPolicyId request
                x-microcks-default: true
                value:
                  external_service_condition:
                    enabled: true
                    entities:
                    - {}
                    external_service_url: https://www.example.com
                    metric: example_value
                    name: Example Title
                    runbook_url: https://www.example.com
                    terms:
                    - {}
                    type: example_value
          application/xml:
            schema:
              $ref: '#/components/schemas/ExternalServiceCondition'
            examples:
              PostalertsexternalserviceconditionspoliciespolicyidRequestExample:
                summary: Default postAlertsExternalServiceConditionsPoliciesPolicyId request
                x-microcks-default: true
                value:
                  external_service_condition:
                    enabled: true
                    entities:
                    - {}
                    external_service_url: https://www.example.com
                    metric: example_value
                    name: Example Title
                    runbook_url: https://www.example.com
                    terms:
                    - {}
                    type: example_value
        required: true
      responses:
        '200':
          description: No response was specified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalServiceConditionResponse'
              examples:
                Postalertsexternalserviceconditionspoliciespolicyid200Example:
                  summary: Default postAlertsExternalServiceConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                    external_service_condition:
                      enabled: {}
                      entities: {}
                      external_service_url: {}
                      id: {}
                      metric: {}
                      name: {}
                      runbook_url: {}
                      terms: {}
                      type: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/ExternalServiceConditionResponse'
              examples:
                Postalertsexternalserviceconditionspoliciespolicyid200Example:
                  summary: Default postAlertsExternalServiceConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                    external_service_condition:
                      enabled: {}
                      entities: {}
                      external_service_url: {}
                      id: {}
                      metric: {}
                      name: {}
                      runbook_url: {}
                      terms: {}
                      type: {}
      x-codegen-request-body-name: external_service_condition
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        GenerateOperationSummariesFromPath: true
        ChooseTags: true
      operationId: postAlertsExternalServiceConditionsPoliciesPolicyId
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /alerts_location_failure_conditions/policies/{policy_id}.json:
    get:
      tags:
      - Policies
      summary: New Relic Get Alerts Location Failure Conditions Policies
      description: '<strong>🔥 This endpoint will be deprecated after 2024/01 🔥</strong> New users should use <a href="https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-nerdgraph/nerdgraph-api-examples/">these docs about managing alerts via NerdGraph.</a>


        <hr>


        <p>This API endpoint allows you to list the alerts location failure conditions for your Alerts policy.</p>

        '
      parameters:
      - name: policy_id
        in: path
        description: Alerts policy ID
        required: true
        schema:
          type: integer
        example: 100
      - name: page
        in: query
        description: Pagination index
        schema:
          type: integer
        example: 100
      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:
                type: array
                items:
                  $ref: '#/components/schemas/ConditionResponse'
              examples:
                Getalertslocationfailureconditionspoliciespolicyid200Example:
                  summary: Default getAlertsLocationFailureConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                  - condition: {}
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConditionResponse'
              examples:
                Getalertslocationfailureconditionspoliciespolicyid200Example:
                  summary: Default getAlertsLocationFailureConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                  - condition: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        GenerateOperationSummariesFromPath: true
        ChooseTags: true
      operationId: getAlertsLocationFailureConditionsPoliciesPolicyId
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      tags:
      - Policies
      summary: New Relic Post Alerts Location Failure Conditions Policies
      description: '<strong>🔥 This endpoint will be deprecated after 2024/01 🔥</strong> New users should use <a href="https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-nerdgraph/nerdgraph-api-examples/">these docs about managing alerts via NerdGraph.</a>


        <hr>


        <p>This API endpoint allows you to create the alerts location failure conditions for your Alerts policy.</p>

        '
      parameters:
      - name: policy_id
        in: path
        description: Alerts policy failure condition
        required: true
        schema:
          type: integer
        example: 100
      - name: location_failure_condition
        in: path
        description: Alerts policy ID
        required: true
        schema:
          type: integer
        example: 100
      requestBody:
        description: Condition schema
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConditionResponse'
            examples:
              PostalertslocationfailureconditionspoliciespolicyidRequestExample:
                summary: Default postAlertsLocationFailureConditionsPoliciesPolicyId request
                x-microcks-default: true
                value:
                  condition:
                    condition_scope: example_value
                    enabled: true
                    entities:
                    - {}
                    gc_metric: example_value
                    id: abc123
                    metric: example_value
                    name: Example Title
                    runbook_url: https://www.example.com
                    terms:
                    - {}
                    type: example_value
                    violation_close_timer: 10
          application/xml:
            schema:
              $ref: '#/components/schemas/ConditionResponse'
            examples:
              PostalertslocationfailureconditionspoliciespolicyidRequestExample:
                summary: Default postAlertsLocationFailureConditionsPoliciesPolicyId request
                x-microcks-default: true
                value:
                  condition:
                    condition_scope: example_value
                    enabled: true
                    entities:
                    - {}
                    gc_metric: example_value
                    id: abc123
                    metric: example_value
                    name: Example Title
                    runbook_url: https://www.example.com
                    terms:
                    - {}
                    type: example_value
                    violation_close_timer: 10
        required: true
      responses:
        '200':
          description: No response was specified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConditionResponse'
              examples:
                Postalertslocationfailureconditionspoliciespolicyid200Example:
                  summary: Default postAlertsLocationFailureConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                    condition:
                      condition_scope: {}
                      enabled: {}
                      entities: {}
                      gc_metric: {}
                      id: {}
                      metric: {}
                      name: {}
                      runbook_url: {}
                      terms: {}
                      type: {}
                      user_defined: {}
                      violation_close_timer: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/ConditionResponse'
              examples:
                Postalertslocationfailureconditionspoliciespolicyid200Example:
                  summary: Default postAlertsLocationFailureConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                    condition:
                      condition_scope: {}
                      enabled: {}
                      entities: {}
                      gc_metric: {}
                      id: {}
                      metric: {}
                      name: {}
                      runbook_url: {}
                      terms: {}
                      type: {}
                      user_defined: {}
                      violation_close_timer: {}
      x-codegen-request-body-name: condition
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        GenerateOperationSummariesFromPath: true
        ChooseTags: true
      operationId: postAlertsLocationFailureConditionsPoliciesPolicyId
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /alerts_nrql_conditions/policies/{policy_id}.json:
    post:
      tags:
      - Policies
      summary: New Relic Post Alerts Nrql Conditions Policies
      description: '🔥🔥 New users should use <a href="https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-nerdgraph/nerdgraph-api-examples/">these docs about managing alerts via NerdGraph.</a>

        '
      parameters:
      - name: policy_id
        in: path
        description: Alerts policy ID
        required: true
        schema:
          type: integer
        example: 100
      requestBody:
        description: Condition schema
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NrqlCondition'
            examples:
              PostalertsnrqlconditionspoliciespolicyidRequestExample:
                summary: Default postAlertsNrqlConditionsPoliciesPolicyId request
                x-microcks-default: true
                value:
                  nrql_condition:
                    enabled: true
                    expected_groups: 10
                    ignore_overlap: true
                    name: Example Title
                    runbook_url: https://www.example.com
                    terms:
                    - {}
                    value_function: example_value
          application/xml:
            schema:
              $ref: '#/components/schemas/NrqlCondition'
            examples:
              PostalertsnrqlconditionspoliciespolicyidRequestExample:
                summary: Default postAlertsNrqlConditionsPoliciesPolicyId request
                x-microcks-default: true
                value:
                  nrql_condition:
                    enabled: true
                    expected_groups: 10
                    ignore_overlap: true
                    name: Example Title
                    runbook_url: https://www.example.com
                    terms:
                    - {}
                    value_function: example_value
        required: true
      responses:
        '200':
          description: No response was specified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NrqlConditionResponse'
              examples:
                Postalertsnrqlconditionspoliciespolicyid200Example:
                  summary: Default postAlertsNrqlConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                    nrql_condition:
                      enabled: {}
                      expected_groups: {}
                      id: {}
                      ignore_overlap: {}
                      name: {}
                      nrql: {}
                      runbook_url: {}
                      terms: {}
                      type: {}
                      value_function: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/NrqlConditionResponse'
              examples:
                Postalertsnrqlconditionspoliciespolicyid200Example:
                  summary: Default postAlertsNrqlConditionsPoliciesPolicyId 200 response
                  x-microcks-default: true
                  value:
                    nrql_condition:
                      enabled: {}
                      expected_groups: {}
                      id: {}
                      ignore_overlap: {}
                      name: {}
                      nrql: {}
                      runbook_url: {}
                      terms: {}
                      type: {}
                      value_function: {}
      x-codegen-request-body-name: nrql_condition
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        GenerateOperationSummariesFromPath: true
        ChooseTags: true
      operationId: postAlertsNrqlConditionsPoliciesPolicyId
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /alerts_policies.json:
    get:
      tags:
      - Policies
      summary: New Relic Get Alerts Policies
      description: '🔥🔥 New users should use <a href="https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-nerdgraph/nerdgraph-api-examples/">these docs about managing alerts via NerdGraph.</a>


        <p>This API endpoint works with new Alerts on alerts.newrelic.com.</p>


        <p>This API endpoint returns a list of the alert policies associated with your New Relic account.</p>


        <p>See our documentation for a discussion on <a href="https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/pagination-api-output" target="_blank">

        output pagination</a>.</p>


        '
      parameters:
      - name: filter[name]
        in: query
        description: Name (must be exact match)
        schema:
          type: string
        example: example_string
      - name: page
        in: query
        description: Pagination index
        schema:
          type: integer
        example: 100
      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/PolicyResponse'
              examples:
                Getalertspolicies200Example:
                  summary: Default getAlertsPolicies 200 response
                  x-microcks-default: true
                  value:
                    policy:
                      created_at: {}
                      id: {}
                      incident_preference: {}
                      name: {}
                      updated_at: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/PolicyResponse'
              examples:
                Getalertspolicies200Example:
                  summary: Default getAlertsPolicies 200 response
                  x-microcks-default: true
                  value:
                    policy:
                      created_at: {}
                      id: {}
                      incident_preference: {}
                      name: {}
                      up

# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/new-relic/refs/heads/main/openapi/new-relic-policies-api-openapi.yml