New Relic · Arazzo Workflow

New Relic Associate Entity With Condition

Version 1.0.0

Create a policy condition then associate an entity with it.

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

Provider

new-relic

Workflows

associate-entity-with-condition
Create a condition on a policy then bind an entity to it.
Resolves the policy id by name, creates a metric condition, captures the new condition id, and associates an entity with that condition.
3 steps inputs: conditionName, conditionType, entityId, entityType, metric, policyName outputs: conditionId, policyId
1
findPolicy
Resolve the alert policy id by exact name.
2
createCondition
Create a metric condition on the resolved policy, returning the condition id used for the entity association.
3
associateEntity
Associate the supplied entity with the new condition so the condition evaluates specifically against that entity.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: New Relic Associate Entity With Condition
  summary: Create a policy condition then associate an entity with it.
  description: >-
    Targets a specific entity with an alert condition. The workflow resolves a
    policy by name, creates a metric condition on it, and then associates a named
    entity with that condition so the condition evaluates against the chosen
    entity. 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: associate-entity-with-condition
  summary: Create a condition on a policy then bind an entity to it.
  description: >-
    Resolves the policy id by name, creates a metric condition, captures the new
    condition id, and associates an entity with that condition.
  inputs:
    type: object
    required:
    - policyName
    - conditionName
    - conditionType
    - metric
    - entityId
    - entityType
    properties:
      policyName:
        type: string
        description: The exact name of the alert policy to create the condition on.
      conditionName:
        type: string
        description: A title for the alert condition.
      conditionType:
        type: string
        description: Condition type (e.g. apm_app_metric, browser_metric).
      metric:
        type: string
        description: The metric the condition evaluates.
      entityId:
        type: integer
        description: The id of the entity to associate with the condition.
      entityType:
        type: string
        description: The entity type (BrowserApplication, Application, MobileApplication, Server, KeyTransaction).
  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: createCondition
    description: >-
      Create a metric condition on the resolved policy, returning the condition
      id used for the entity association.
    operationId: postAlertsConditionsPoliciesPolicyId
    parameters:
    - name: policy_id
      in: path
      value: $steps.findPolicy.outputs.policyId
    requestBody:
      contentType: application/json
      payload:
        condition:
          name: $inputs.conditionName
          type: $inputs.conditionType
          metric: $inputs.metric
          enabled: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      conditionId: $response.body#/condition/id
  - stepId: associateEntity
    description: >-
      Associate the supplied entity with the new condition so the condition
      evaluates specifically against that entity.
    operationId: putAlertsEntityConditionsEntityId
    parameters:
    - name: entity_id
      in: path
      value: $inputs.entityId
    - name: entity_type
      in: query
      value: $inputs.entityType
    - name: condition_id
      in: query
      value: $steps.createCondition.outputs.conditionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      condition: $response.body#/condition
  outputs:
    policyId: $steps.findPolicy.outputs.policyId
    conditionId: $steps.createCondition.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-associate-entity-with-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.