---
title: Get a muting rule
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/newrelic/alerts/newrelic-alerts-get-muting-rule
---

The action identifier is `newrelic.alerts.getMutingRule`.

Retrieves the details of a single muting rule, including its condition group and schedule.

## Inputs

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

| Input         | Type   | Description                                                     | Example                                                                                                      |
| ------------- | ------ | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| **accountId** | Int    | **Required.** The New Relic account that owns the muting rule.  | `123456`                                                                                                     |
| **id**        | String | **Required.** The ID of the muting rule to retrieve.            | `"7654321"`                                                                                                  |
| **selectors** | List   | **Optional.** JQ selectors to extract values from the response. | ```yaml selectors:   - name: mutingRuleName     expression: ".data.actor.account.alerts.mutingRule.name" ``` |

## Outputs

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 fields from `.data.actor.account.alerts.mutingRule`. ```json {   "data": {     "actor": {       "account": {         "alerts": {           "mutingRule": {             "id": "7654321",             "name": "Deploy window - checkout service",             "enabled": true,             "status": "SCHEDULED",             "accountId": 123456,             "condition": {               "operator": "AND",               "conditions": [                 {                   "attribute": "policyName",                   "operator": "EQUALS",                   "values": ["Checkout Service"]                 }               ]             },             "schedule": {               "startTime": "2026-09-01T02:00:00",               "endTime": "2026-09-01T04:00:00",               "timeZone": "America/Los_Angeles",               "repeat": "WEEKLY",               "weeklyRepeatDays": ["SATURDAY", "SUNDAY"]             }           }         }       }     }   } } ``` |

## Example

The following example fetches a muting rule's current configuration.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: get_muting_rule description: Get a muting rule steps:   - name: getMutingRule     type: action     action: newrelic.alerts.getMutingRule     version: 1     inputs:       accountId: ${{ .workflowInputs.accountId }}       id: ${{ .workflowInputs.mutingRuleId }}       selectors:         - name: mutingRuleName           expression: ".data.actor.account.alerts.mutingRule.name"     next: end ``` |
