• /
  • EnglishEspañolFrançais日本語한국어Português
  • EntrarComeçar agora

Search alert policies

|View as Markdown (English)

The action identifier is newrelic.alerts.searchPolicies.

Searches alert policies with optional filtering by ID or name. Supports cursor-based pagination. Omitting all filters returns all policies in the account.

The following table describes all available input fields for this action.

Input

Type

Description

Example

accountId

Int

Required. The New Relic account to search policies in.

123456

ids

List

Optional. Filter to policies with these IDs.

["2000002"]

name

String

Optional. Filter to policies with this exact name.

"Production Services"

nameLike

String

Optional. Filter to policies whose name contains this substring.

"Production"

cursor

String

Optional. Pagination cursor from a prior call's nextCursor output. Leave blank on the first call.

"eyJsYXN0SWQiOiIxMjM0NTYifQ=="

selectors

List

Optional. JQ selectors to extract values from the response.

selectors:
- name: policies
expression: ".data.actor.account.alerts.policiesSearch.policies"
- name: nextCursor
expression: ".data.actor.account.alerts.policiesSearch.nextCursor"

The following table describes all output fields returned by this action.

Output

Type

Description

success

Boolean

true when the step executed without error.

errorMessage

String

Error message on failure. null on success.

data

Map

NerdGraph response. Use selectors to extract policies, nextCursor, or totalCount. nextCursor is null when there are no further pages.

{
"data": {
"actor": {
"account": {
"alerts": {
"policiesSearch": {
"nextCursor": null,
"totalCount": 1,
"policies": [
{
"id": "2000002",
"name": "Production Services",
"incidentPreference": "PER_CONDITION",
"accountId": 123456
}
]
}
}
}
}
}
}

The following example finds all policies whose names contain "Production".

Workflow example

name: search_alert_policies
description: Search alert policies by name
steps:
- name: searchPolicies
type: action
action: newrelic.alerts.searchPolicies
version: 1
inputs:
accountId: ${{ .workflowInputs.accountId }}
nameLike: "Production"
selectors:
- name: policies
expression: ".data.actor.account.alerts.policiesSearch.policies"
next: end
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.