New Relic · Arazzo Workflow

New Relic Prune NRQL Condition

Version 1.0.0

Resolve a policy by name, list its NRQL conditions, and delete one.

1 workflow 1 source API 1 provider
View Spec View on GitHub AnalysisAnalyticsAPMDevOpsInfrastructureMonitoringObservabilityPerformancePlatformArazzoWorkflows

Provider

new-relic

Workflows

prune-nrql-condition
Resolve a policy, find a NRQL condition, and delete it.
Filters policies by name, lists the NRQL conditions scoped to the matched policy, captures the first condition id, and deletes it.
3 steps inputs: policyName outputs: deletedConditionId, policyId
1
findPolicy
Resolve the alert policy id by exact name.
2
listNrqlConditions
List the NRQL conditions attached to the resolved policy and capture a condition id to delete.
3
deleteNrqlCondition
Delete the identified NRQL condition so the policy stops evaluating the retired query.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: New Relic Prune NRQL Condition
  summary: Resolve a policy by name, list its NRQL conditions, and delete one.
  description: >-
    A cleanup pattern for retiring stale NRQL alert conditions. The workflow
    resolves an alert policy by name, lists the NRQL conditions attached to that
    policy, captures one condition id, and deletes it so the policy no longer
    evaluates the retired query. Every step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: alertsApi
  url: ../openapi/new-relic-alerts-api-openapi.yml
  type: openapi
workflows:
- workflowId: prune-nrql-condition
  summary: Resolve a policy, find a NRQL condition, and delete it.
  description: >-
    Filters policies by name, lists the NRQL conditions scoped to the matched
    policy, captures the first condition id, and deletes it.
  inputs:
    type: object
    required:
    - policyName
    properties:
      policyName:
        type: string
        description: The exact name of the alert policy whose NRQL condition to prune.
  steps:
  - stepId: findPolicy
    description: Resolve the alert policy id by exact name.
    operationId: getAlertsPolicies
    parameters:
    - name: filter[name]
      in: query
      value: $inputs.policyName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      policyId: $response.body#/policy/id
  - stepId: listNrqlConditions
    description: >-
      List the NRQL conditions attached to the resolved policy and capture a
      condition id to delete.
    operationId: getAlertsNrqlConditions
    parameters:
    - name: policy_id
      in: query
      value: $steps.findPolicy.outputs.policyId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      conditionId: $response.body#/nrql_condition/id
  - stepId: deleteNrqlCondition
    description: >-
      Delete the identified NRQL condition so the policy stops evaluating the
      retired query.
    operationId: deleteAlertsNrqlConditionsConditionId
    parameters:
    - name: condition_id
      in: path
      value: $steps.listNrqlConditions.outputs.conditionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deletedCondition: $response.body#/nrql_condition
  outputs:
    policyId: $steps.findPolicy.outputs.policyId
    deletedConditionId: $steps.listNrqlConditions.outputs.conditionId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/new-relic-prune-nrql-condition-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.