> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitor mutations

> Create, patch, trigger and delete drift, performance and data quality monitors. Arguments, return types and a validated example for each of the 9 mutations.

Create, patch, trigger and delete drift, performance and data quality monitors.

For task-oriented walkthroughs of these operations, see the [Monitor guide](/docs/ax/graphql-reference/guides/monitors). Every mutation below is sent as a `POST` to `https://app.arize.com/graphql` with an `x-api-key` header; see [Forming calls](/docs/ax/graphql-reference/overview/how-to-use-graphql/forming-calls).

## Mutations in this page

* [`createDriftMonitor`](#createdriftmonitor): Creates a new custom drift monitor.
* [`createPerformanceMonitor`](#createperformancemonitor): Creates a new custom performance monitor.
* [`createDataQualityMonitor`](#createdataqualitymonitor): Create data quality monitor.
* [`patchDriftMonitor`](#patchdriftmonitor): Patch drift monitor.
* [`patchPerformanceMonitor`](#patchperformancemonitor): Patch performance monitor.
* [`patchDataQualityMonitor`](#patchdataqualitymonitor): Patch data quality monitor.
* [`patchMonitor`](#patchmonitor): Patch monitor.
* [`triggerMonitor`](#triggermonitor): Manually trigger a monitor
* [`deleteMonitor`](#deletemonitor): Delete monitor.

## Reference

### createDriftMonitor

Creates a new custom drift monitor.

`createDriftMonitor(input: CreateDriftMonitorMutationInput!): CreateDriftMonitorMutationPayload`

#### Arguments

**input** `CreateDriftMonitorMutationInput!` *required*

**CreateDriftMonitorMutationInput fields**

**spaceId** `ID`

The id of the space to look up the model name

**modelName** `String`

The name of the model to create a monitor for. The use of this field also requires using spaceId.

**modelId** `ID`

The model ID of the metric window.

**driftMetric** `DriftMetric!` *required*

The drift metric to monitor, ex. psi. One of: `psi`, `kl`, `js`, `ks`, `euclideanDistance`, `cosineSimilarity`.

**name** `String!` *required*

The name of the monitor.

**threshold** `Float`

The threshold of the monitor. Used in conjunction with comparison operator to determine if alert condition has been met.

**dynamicAutoThreshold** `MonitorAutoThresholdInput`

**MonitorAutoThresholdInput fields**

**stdDevMultiplier** `Float!` *required*

A coefficient by which to multiply the standard deviation in the threshold calculation: threshold = mean +/- stdDevMultiplier \* stdDev

**operator** `ComparisonOperator!` *required*

The operator of the monitor. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**evaluationWindowLengthSeconds** `Float`

The time window that is used to calculate the metric on every evaluation. Should be able to be represented as an integer hour.

**delaySeconds** `Float`

The initial delay from the current time for evaluating the monitor in order to allow for 'actuals' to arrive. Generally not as applicable for non-actuals related monitors.

**dimensionName** `String`

The name of the dimension (feature, prediction, actual, tag) to create the Drift Monitor for.

**dimensionCategory** `DimensionCategory!` *required*

The category of the feature label, ex. feature, prediction, actuals. One of: `featureLabel`, `prediction`, `actuals`, `actualScore`, `actualClass`, `predictionClass`, `predictionScore`, `tag`, `spanProperty`, `llmEval`, `annotation`, `userAnnotation`, `modelVersion`, `batchId`.

**modelVersions** `[String!]`

The model versions by which to filter the primary dataset. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters to apply when calculating the primary dataset (e.g. current data)

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**baseline** `DriftMonitorBaseline`

Defines the reference data (e.g. baseline) to use to calculate drift

**DriftMonitorBaseline fields**

**dimensionName** `String`

The feature or tag label of the comparison dataset. Required if `dimensionCategory` is set to feature or tag

**dimensionCategory** `DimensionCategory`

The category of the model dimension, ex. feature, prediction, actuals. One of: `featureLabel`, `prediction`, `actuals`, `actualScore`, `actualClass`, `predictionClass`, `predictionScore`, `tag`, `spanProperty`, `llmEval`, `annotation`, `userAnnotation`, `modelVersion`, `batchId`.

**useModelPrimaryBaseline** `Boolean!` *required*

If true, use the model's primary baseline to build the comparison dataset.

**movingWindowSeconds** `Float`

The moving evaluation window length of the custom baseline. E.g. how much data in time to use to compute the baseline

**movingWindowDelaySeconds** `Float`

How far back to look for data to use as the monitor's baseline

**fixedStartDate** `DateTime`

The start bookend of the custom baseline's time range.

**fixedEndDate** `DateTime`

The end bookend of the custom baseline's time range.

**modelVersions** `[String!]`

The model versions by which to filter the comparison dataset. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters on this comparison dataset. Only valid if using custom baselines.

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**contacts** `[MonitorContactInput!]`

How and who to contact when the monitor triggers

**MonitorContactInput fields**

**notificationChannelType** `NotificationChannelType!` *required*

The notification channel type of the monitor contact. One of: `email`, `integration`.

**emailAddress** `EmailAddress`

The email address of the monitor contact. Ex. [steve@arize.com](mailto:steve@arize.com)

**integrationKeyId** `ID`

The integration key id of the integration

**webhookSubscriptions** `[WebhookSubscriptionInput!]`

Webhooks to notify for this monitor and which events each is subscribed to.

**WebhookSubscriptionInput fields**

**webhookId** `ID!` *required*

Relay global ID of the webhook destination (webhooks\_destinations).

**subscribedWebhookEvents** `[WebhookEventName!]!` *required*

Events to subscribe to (e.g. monitor.triggered, prompt.version.created). One of: `MONITOR_TRIGGERED`, `MONITOR_CLEARED`, `MONITOR_NO_DATA`, `PROMPT_VERSION_CREATED`, `PROMPT_VERSION_LABELED`, `PROMPT_VERSION_UNLABELED`, `EVALUATOR_VERSION_CREATED`.

**notes** `String`

Monitor notes. Notifications support \{\{monitor.name}}, \{\{monitor.id}}, \{\{resource.name}}, \{\{metric.name}}, \{\{metric.value}}, \{\{threshold.operator}}, \{\{threshold.value}}, \{\{evaluation.start}}, \{\{evaluation.end}}, \{\{monitor.url}}, \{\{traces.url}} (tracing projects only) (limited to 1000 characters)

**downtimeStart** `DateTime`

The start date of the monitor's downtime if scheduled.

**downtimeDurationHrs** `Int`

Duration of downtime for a monitor in number of hours. Between 1 and 1344 hours

**downtimeFrequencyDays** `Int`

Frequency of downtime for a monitor in number of days. Between 1 and 56 days

**scheduledRuntimeEnabled** `Boolean`

If true, the monitor is scheduled to run at a specific time.

**scheduledRuntimeCadenceSeconds** `Int`

The cadence of the monitor's scheduled runtime in seconds.

**scheduledRuntimeDaysOfWeek** `[Int!]`

The days of the week the monitor is scheduled to run.

**thresholdMode** `MonitorThresholdMode`

The threshold mode of the monitor, either single or range. One of: `single`, `range`.

**threshold2** `Float`

The second threshold of the monitor, if using a range threshold.

**operator2** `ComparisonOperator`

The second operator of the monitor, if using a range threshold. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**stdDevMultiplier2** `Float`

The second standard deviation multiplier, if using a range threshold. Used to determine the suggested threshold for the monitor.

**autoThresholdLookbackSeconds** `Int`

The lookback seconds for the auto threshold.

**thresholdCalculationType** `MonitorThresholdCalculationType`

Calculation used for auto thresholds. Either mean + stdev or median + median absolute deviation (mad). One of: `stdev`, `mad`.

**manualEvaluationEnabled** `Boolean`

Whether manual evaluation is enabled.

**clientMutationId** `String`

#### Returns

**monitor** `Monitor!`

The created drift monitor.

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation CreateDriftMonitor($input: CreateDriftMonitorMutationInput!) {
  createDriftMonitor(input: $input) {
    monitor { id name status }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "driftMetric": "psi",
    "name": "<string>",
    "operator": "greaterThan",
    "dimensionCategory": "featureLabel"
  }
}
```

### createPerformanceMonitor

Creates a new custom performance monitor.

`createPerformanceMonitor(input: CreatePerformanceMonitorMutationInput!): CreatePerformanceMonitorMutationPayload`

#### Arguments

**input** `CreatePerformanceMonitorMutationInput!` *required*

**CreatePerformanceMonitorMutationInput fields**

**spaceId** `ID`

The id of the space to look up the model name

**modelName** `String`

The name of the model to create a monitor for. The use of this field also requires using spaceId.

**modelId** `ID`

The id of the model to create the Performance Monitor for.

**name** `String!` *required*

A name that describes the performance monitor

**performanceMetric** `PerformanceMetric`

The performance metric to monitor. E.x. 'accuracy'. The metric must be supported by the model type. One of: `accuracy`, `precision`, `recall`, `f_1`, `sensitivity`, `specificity`, `falsePositiveRate`, `falseNegativeRate`, `falseNegativeDensity`, `mse`, `rmse`, `mae`, `mape`, `predictionAverage`, `actualsAverage`, `auc`, `logLoss`, `rSquared`, `prAuc`, `meanError`, `calibration`, `ndcg`, `recallParity`, `falsePositiveRateParity`, `disparateImpact`, `wape`, `smape`, `mase`, `udf`, `groupAuc`, `mrr`, `rankingMap`, `rankingRecall`, `rankingPrecision`, `microAveragedPrecision`, `microAveragedRecall`, `multiClassPrecision`, `multiClassRecall`, `macroAveragedPrecision`, `macroAveragedRecall`.

**customMetricId** `ID`

The id of the custom metric ID to create the Performance Monitor for.

**positiveClassValue** `String`

The positive class used for classification metrics. This only applies to performance monitors for classification models.

**predictionClassValue** `String`

The prediction class used for classification metrics. This only applies to performance monitors for multi-class models.

**metricAtRankingKValue** `Int`

The @K value for the performance metric. Model must be ranking.

**operator** `ComparisonOperator!` *required*

The operator of the performance monitor. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**threshold** `Float`

The explicit threshold value of the monitor. If absent, the monitor will fallback to automatic threshold calculations.

**dynamicAutoThreshold** `MonitorAutoThresholdInput`

**MonitorAutoThresholdInput fields**

**stdDevMultiplier** `Float!` *required*

A coefficient by which to multiply the standard deviation in the threshold calculation: threshold = mean +/- stdDevMultiplier \* stdDev

**modelVersions** `[String!]`

The model versions by which to filter the model's inferences. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters on the model's inferences. (ex. narrow the monitor to just the case where state=CA)

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**evaluationWindowLengthSeconds** `Float`

The time window that is used to calculate the metric on every evaluation. Should be able to be represented as an integer hour.

**delaySeconds** `Float`

The initial delay from the current time for evaluating the monitor in order to allow for 'actuals' to arrive. Generally not as applicable for non-actuals related monitors.

**contacts** `[MonitorContactInput!]`

How and who to contact when the monitor triggers

**MonitorContactInput fields**

**notificationChannelType** `NotificationChannelType!` *required*

The notification channel type of the monitor contact. One of: `email`, `integration`.

**emailAddress** `EmailAddress`

The email address of the monitor contact. Ex. [steve@arize.com](mailto:steve@arize.com)

**integrationKeyId** `ID`

The integration key id of the integration

**webhookSubscriptions** `[WebhookSubscriptionInput!]`

Webhooks to notify for this monitor and which events each is subscribed to.

**WebhookSubscriptionInput fields**

**webhookId** `ID!` *required*

Relay global ID of the webhook destination (webhooks\_destinations).

**subscribedWebhookEvents** `[WebhookEventName!]!` *required*

Events to subscribe to (e.g. monitor.triggered, prompt.version.created). One of: `MONITOR_TRIGGERED`, `MONITOR_CLEARED`, `MONITOR_NO_DATA`, `PROMPT_VERSION_CREATED`, `PROMPT_VERSION_LABELED`, `PROMPT_VERSION_UNLABELED`, `EVALUATOR_VERSION_CREATED`.

**notes** `String`

Monitor notes. Notifications support \{\{monitor.name}}, \{\{monitor.id}}, \{\{resource.name}}, \{\{metric.name}}, \{\{metric.value}}, \{\{threshold.operator}}, \{\{threshold.value}}, \{\{evaluation.start}}, \{\{evaluation.end}}, \{\{monitor.url}}, \{\{traces.url}} (tracing projects only) (limited to 1000 characters)

**downtimeStart** `DateTime`

The start date of the monitor's downtime if scheduled.

**downtimeDurationHrs** `Int`

Duration of downtime for a monitor in number of hours. Between 1 and 1344 hours

**downtimeFrequencyDays** `Int`

Frequency of downtime for a monitor in number of days. Between 1 and 56 days

**scheduledRuntimeEnabled** `Boolean`

If true, the monitor is scheduled to run at a specific time.

**scheduledRuntimeCadenceSeconds** `Int`

The cadence of the monitor's scheduled runtime in seconds.

**scheduledRuntimeDaysOfWeek** `[Int!]`

The days of the week the monitor is scheduled to run.

**modelEnvironmentName** `ModelEnvironmentName`

The environment for which to retrieve the model schema for. One of: `production`, `validation`, `training`, `tracing`.

**thresholdMode** `MonitorThresholdMode`

The threshold mode of the monitor, either single or range. One of: `single`, `range`.

**threshold2** `Float`

The second threshold of the monitor, if using a range threshold.

**operator2** `ComparisonOperator`

The second operator of the monitor, if using a range threshold. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**stdDevMultiplier2** `Float`

The second standard deviation multiplier, if using a range threshold. Used to determine the suggested threshold for the monitor.

**autoThresholdLookbackSeconds** `Int`

The lookback seconds for the auto threshold.

**thresholdCalculationType** `MonitorThresholdCalculationType`

Calculation used for auto thresholds. Either mean + stdev or median + median absolute deviation (mad). One of: `stdev`, `mad`.

**manualEvaluationEnabled** `Boolean`

Whether manual evaluation is enabled.

**clientMutationId** `String`

#### Returns

**monitor** `Monitor!`

The created performance monitor.

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation CreatePerformanceMonitor($input: CreatePerformanceMonitorMutationInput!) {
  createPerformanceMonitor(input: $input) {
    monitor { id name status }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "name": "<string>",
    "operator": "greaterThan"
  }
}
```

### createDataQualityMonitor

`createDataQualityMonitor(input: CreateDataQualityMonitorMutationInput!): CreateDataQualityMonitorMutationPayload`

#### Arguments

**input** `CreateDataQualityMonitorMutationInput!` *required*

**CreateDataQualityMonitorMutationInput fields**

**spaceId** `ID`

The id of the space to look up the model name

**modelName** `String`

The name of the model to create a monitor for. The use of this field also requires using spaceId.

**modelId** `ID`

The id of the model to create the Data Quality Monitor for.

**name** `String!` *required*

A name that describes the data quality monitor

**dimensionName** `String`

The feature label to create the Data Quality Monitor on.

**dimensionCategory** `DimensionCategory!` *required*

The category of the feature label, ex. feature, prediction, actuals. One of: `featureLabel`, `prediction`, `actuals`, `actualScore`, `actualClass`, `predictionClass`, `predictionScore`, `tag`, `spanProperty`, `llmEval`, `annotation`, `userAnnotation`, `modelVersion`, `batchId`.

**dataQualityMetric** `DataQualityMetric!` *required*

The data quality metric of the monitor, ex. count, avg, etc. One of: `avg`, `count`, `sum`, `percentEmpty`, `cardinality`, `standardDeviation`, `p50`, `p95`, `p99`, `p99_9`, `newValues`, `missingValues`, `averageStringListLength`.

**evaluationWindowLengthSeconds** `Float`

The time window that is used to calculate the metric on every evaluation. Should be able to be represented as an integer hour.

**delaySeconds** `Float`

The initial delay from the current time for evaluating the monitor in order to allow for 'actuals' to arrive. Generally not as applicable for non-actuals related monitors.

**threshold** `Float`

The threshold of the monitor. Used in conjunction with comparison operator to determine if alert condition has been met.

**dynamicAutoThreshold** `MonitorAutoThresholdInput`

**MonitorAutoThresholdInput fields**

**stdDevMultiplier** `Float!` *required*

A coefficient by which to multiply the standard deviation in the threshold calculation: threshold = mean +/- stdDevMultiplier \* stdDev

**operator** `ComparisonOperator!` *required*

The operator of the data quality monitor. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**modelVersions** `[String!]`

The model versions by which to filter the model's inferences. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters on the model's inferences. (ex. narrow the monitor to just the case where state=CA)

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**contacts** `[MonitorContactInput!]`

How and who to contact when the monitor triggers

**MonitorContactInput fields**

**notificationChannelType** `NotificationChannelType!` *required*

The notification channel type of the monitor contact. One of: `email`, `integration`.

**emailAddress** `EmailAddress`

The email address of the monitor contact. Ex. [steve@arize.com](mailto:steve@arize.com)

**integrationKeyId** `ID`

The integration key id of the integration

**webhookSubscriptions** `[WebhookSubscriptionInput!]`

Webhooks to notify for this monitor and which events each is subscribed to.

**WebhookSubscriptionInput fields**

**webhookId** `ID!` *required*

Relay global ID of the webhook destination (webhooks\_destinations).

**subscribedWebhookEvents** `[WebhookEventName!]!` *required*

Events to subscribe to (e.g. monitor.triggered, prompt.version.created). One of: `MONITOR_TRIGGERED`, `MONITOR_CLEARED`, `MONITOR_NO_DATA`, `PROMPT_VERSION_CREATED`, `PROMPT_VERSION_LABELED`, `PROMPT_VERSION_UNLABELED`, `EVALUATOR_VERSION_CREATED`.

**notes** `String`

Monitor notes. Notifications support \{\{monitor.name}}, \{\{monitor.id}}, \{\{resource.name}}, \{\{metric.name}}, \{\{metric.value}}, \{\{threshold.operator}}, \{\{threshold.value}}, \{\{evaluation.start}}, \{\{evaluation.end}}, \{\{monitor.url}}, \{\{traces.url}} (tracing projects only) (limited to 1000 characters)

**baseline** `DataQualityMonitorBaseline`

**DataQualityMonitorBaseline fields**

**dimensionName** `String`

The feature or tag label of the comparison dataset. Required if `dimensionCategory` is set to feature or tag

**dimensionCategory** `DimensionCategory`

The category of the model dimension, ex. feature, prediction, actuals. One of: `featureLabel`, `prediction`, `actuals`, `actualScore`, `actualClass`, `predictionClass`, `predictionScore`, `tag`, `spanProperty`, `llmEval`, `annotation`, `userAnnotation`, `modelVersion`, `batchId`.

**useModelPrimaryBaseline** `Boolean!` *required*

If true, use the model's primary baseline to build the comparison dataset.

**movingWindowSeconds** `Float`

The moving evaluation window length of the custom baseline. E.g. how much data in time to use to compute the baseline

**movingWindowDelaySeconds** `Float`

How far back to look for data to use as the monitor's baseline

**fixedStartDate** `DateTime`

The start bookend of the custom baseline's time range.

**fixedEndDate** `DateTime`

The end bookend of the custom baseline's time range.

**modelVersions** `[String!]`

The model versions by which to filter the comparison dataset. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters on this comparison dataset. Only valid if using custom baselines.

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**downtimeStart** `DateTime`

The start date of the monitor's downtime if scheduled.

**downtimeDurationHrs** `Int`

Duration of downtime for a monitor in number of hours. Between 1 and 1344 hours

**downtimeFrequencyDays** `Int`

Frequency of downtime for a monitor in number of days. Between 1 and 56 days

**scheduledRuntimeEnabled** `Boolean`

If true, the monitor is scheduled to run at a specific time.

**scheduledRuntimeCadenceSeconds** `Int`

The cadence of the monitor's scheduled runtime in seconds.

**scheduledRuntimeDaysOfWeek** `[Int!]`

The days of the week the monitor is scheduled to run.

**thresholdMode** `MonitorThresholdMode`

The threshold mode of the monitor, either single or range. One of: `single`, `range`.

**threshold2** `Float`

The second threshold of the monitor, if using a range threshold.

**stdDevMultiplier2** `Float`

The second standard deviation multiplier, if using a range threshold. Used to determine the suggested threshold for the monitor.

**operator2** `ComparisonOperator`

The second operator of the monitor, if using a range threshold. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**modelEnvironmentName** `ModelEnvironmentName`

The environment for which to retrieve the model schema for. One of: `production`, `validation`, `training`, `tracing`.

**autoThresholdLookbackSeconds** `Int`

The lookback seconds for the auto threshold.

**thresholdCalculationType** `MonitorThresholdCalculationType`

Calculation used for auto thresholds. Either mean + stdev or median + median absolute deviation (mad). One of: `stdev`, `mad`.

**manualEvaluationEnabled** `Boolean`

Whether manual evaluation is enabled.

**clientMutationId** `String`

#### Returns

**monitor** `Monitor`

The created data quality monitor.

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation CreateDataQualityMonitor($input: CreateDataQualityMonitorMutationInput!) {
  createDataQualityMonitor(input: $input) {
    monitor { id name status }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "name": "<string>",
    "dimensionCategory": "featureLabel",
    "dataQualityMetric": "avg",
    "operator": "greaterThan"
  }
}
```

### patchDriftMonitor

`patchDriftMonitor(input: PatchDriftMonitorInput!): PatchDriftMonitorPayload`

#### Arguments

**input** `PatchDriftMonitorInput!` *required*

**PatchDriftMonitorInput fields**

**monitorId** `ID!` *required*

The ID of the monitor to patch

**set** `DriftMonitorPatchInput!` *required*

Patch of the monitor calculation

**DriftMonitorPatchInput fields**

**name** `String`

A name that describes the monitor

**threshold** `Float`

Adjust the monitor's alerting threshold

**operator** `ComparisonOperator`

Adjust the monitor's alerting operator. Used in conjunction with the threshold to form an alert condition One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**dynamicAutoThresholdEnabled** `Boolean`

Whether the current monitor threshold value is re-calculated on a regular schedule and thus have a dynamic value that changes over time. Default is false

**dynamicAutoThreshold** `MonitorAutoThresholdInput`

**MonitorAutoThresholdInput fields**

**stdDevMultiplier** `Float!` *required*

A coefficient by which to multiply the standard deviation in the threshold calculation: threshold = mean +/- stdDevMultiplier \* stdDev

**notificationsEnabled** `Boolean`

Whether or not notifications are sent out when the monitor is triggered

**contacts** `[MonitorContactInput!]`

The contacts of the monitor.

**MonitorContactInput fields**

**notificationChannelType** `NotificationChannelType!` *required*

The notification channel type of the monitor contact. One of: `email`, `integration`.

**emailAddress** `EmailAddress`

The email address of the monitor contact. Ex. [steve@arize.com](mailto:steve@arize.com)

**integrationKeyId** `ID`

The integration key id of the integration

**modelVersions** `[String!]`

An array of the model versions by which to filter the dataset. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters on the model's inferences. (ex. narrow the monitor to just the case where state=CA). If this property is provided it will replace any existing filters.

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**notes** `String`

Notes on the monitor

**startDelaySeconds** `PositiveInt`

The number of seconds to wait before starting the monitor. Between 0 and 15552000 (180 days)

**downtimeStart** `DateTime`

The start date and hour of the monitor's downtime if scheduled (ex: 2024-12-01T10:00:00Z).

**downtimeDurationHrs** `PositiveInt`

Duration of downtime for a monitor in number of hours. Between 1 and 1344 hours

**downtimeFrequencyDays** `PositiveInt`

Frequency of downtime for a monitor in number of days. Between 1 and 56 days

**scheduledRuntimeEnabled** `Boolean`

If true, the monitor is scheduled to run at a specific time.

**scheduledRuntimeCadenceSeconds** `Int`

The cadence of the monitor's scheduled runtime in seconds.

**scheduledRuntimeDaysOfWeek** `[Int!]`

The days of the week the monitor is scheduled to run.

**threshold2** `Float`

The second threshold of the monitor, if using a range threshold.

**operator2** `ComparisonOperator`

The second operator of the monitor, if using a range threshold. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**stdDevMultiplier2** `Float`

The second standard deviation multiplier, if using a range threshold. Used to determine the suggested threshold for the monitor.

**thresholdMode** `MonitorThresholdMode`

The threshold mode of the monitor, either single or range. One of: `single`, `range`.

**autoThresholdLookbackSeconds** `Int`

The lookback seconds for the auto threshold.

**thresholdCalculationType** `MonitorThresholdCalculationType`

Calculation used for auto thresholds. Either mean + stdev or median + median absolute deviation (mad). One of: `stdev`, `mad`.

**manualEvaluationEnabled** `Boolean`

Whether manual evaluation is enabled.

**evaluationWindowLengthSeconds** `Float`

The evaluation window length of the monitor in seconds.

**movingWindowSeconds** `Float`

The moving window length of the monitor in seconds.

**movingWindowDelaySeconds** `Float`

The moving window delay of the monitor in seconds.

**clientMutationId** `String`

#### Returns

**monitor** `Monitor!`

The updated drift monitor.

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation PatchDriftMonitor($input: PatchDriftMonitorInput!) {
  patchDriftMonitor(input: $input) {
    monitor { id name status }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "monitorId": "<ID>",
    "set": {}
  }
}
```

### patchPerformanceMonitor

`patchPerformanceMonitor(input: PatchPerformanceMonitorInput!): PatchPerformanceMonitorPayload`

#### Arguments

**input** `PatchPerformanceMonitorInput!` *required*

**PatchPerformanceMonitorInput fields**

**monitorId** `ID!` *required*

The ID of the monitor to patch

**set** `PerformanceMonitorPatchInput!` *required*

Patch of the monitor calculation

**PerformanceMonitorPatchInput fields**

**name** `String`

A name that describes the monitor

**threshold** `Float`

Adjust the monitor's alerting threshold

**operator** `ComparisonOperator`

Adjust the monitor's alerting operator. Used in conjunction with the threshold to form an alert condition One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**dynamicAutoThresholdEnabled** `Boolean`

Whether the current monitor threshold value is re-calculated on a regular schedule and thus have a dynamic value that changes over time. Default is false

**dynamicAutoThreshold** `MonitorAutoThresholdInput`

**MonitorAutoThresholdInput fields**

**stdDevMultiplier** `Float!` *required*

A coefficient by which to multiply the standard deviation in the threshold calculation: threshold = mean +/- stdDevMultiplier \* stdDev

**notificationsEnabled** `Boolean`

Whether or not notifications are sent out when the monitor is triggered

**contacts** `[MonitorContactInput!]`

The contacts of the monitor.

**MonitorContactInput fields**

**notificationChannelType** `NotificationChannelType!` *required*

The notification channel type of the monitor contact. One of: `email`, `integration`.

**emailAddress** `EmailAddress`

The email address of the monitor contact. Ex. [steve@arize.com](mailto:steve@arize.com)

**integrationKeyId** `ID`

The integration key id of the integration

**modelVersions** `[String!]`

An array of the model versions by which to filter the dataset. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters on the model's inferences. (ex. narrow the monitor to just the case where state=CA). If this property is provided it will replace any existing filters.

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**notes** `String`

Notes on the monitor

**startDelaySeconds** `PositiveInt`

The number of seconds to wait before starting the monitor. Between 0 and 15552000 (180 days)

**downtimeStart** `DateTime`

The start date and hour of the monitor's downtime if scheduled (ex: 2024-12-01T10:00:00Z).

**downtimeDurationHrs** `PositiveInt`

Duration of downtime for a monitor in number of hours. Between 1 and 1344 hours

**downtimeFrequencyDays** `PositiveInt`

Frequency of downtime for a monitor in number of days. Between 1 and 56 days

**scheduledRuntimeEnabled** `Boolean`

If true, the monitor is scheduled to run at a specific time.

**scheduledRuntimeCadenceSeconds** `Int`

The cadence of the monitor's scheduled runtime in seconds.

**scheduledRuntimeDaysOfWeek** `[Int!]`

The days of the week the monitor is scheduled to run.

**threshold2** `Float`

The second threshold of the monitor, if using a range threshold.

**operator2** `ComparisonOperator`

The second operator of the monitor, if using a range threshold. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**stdDevMultiplier2** `Float`

The second standard deviation multiplier, if using a range threshold. Used to determine the suggested threshold for the monitor.

**thresholdMode** `MonitorThresholdMode`

The threshold mode of the monitor, either single or range. One of: `single`, `range`.

**autoThresholdLookbackSeconds** `Int`

The lookback seconds for the auto threshold.

**thresholdCalculationType** `MonitorThresholdCalculationType`

Calculation used for auto thresholds. Either mean + stdev or median + median absolute deviation (mad). One of: `stdev`, `mad`.

**manualEvaluationEnabled** `Boolean`

Whether manual evaluation is enabled.

**evaluationWindowLengthSeconds** `Float`

The evaluation window length of the monitor in seconds.

**movingWindowSeconds** `Float`

The moving window length of the monitor in seconds.

**movingWindowDelaySeconds** `Float`

The moving window delay of the monitor in seconds.

**clientMutationId** `String`

#### Returns

**monitor** `Monitor!`

The updated performance monitor.

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation PatchPerformanceMonitor($input: PatchPerformanceMonitorInput!) {
  patchPerformanceMonitor(input: $input) {
    monitor { id name status }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "monitorId": "<ID>",
    "set": {}
  }
}
```

### patchDataQualityMonitor

`patchDataQualityMonitor(input: PatchDataQualityMonitorInput!): PatchDataQualityMonitorPayload`

#### Arguments

**input** `PatchDataQualityMonitorInput!` *required*

**PatchDataQualityMonitorInput fields**

**monitorId** `ID!` *required*

The ID of the monitor to patch

**set** `DataQualityMonitorPatchInput!` *required*

Patch of the monitor calculation

**DataQualityMonitorPatchInput fields**

**name** `String`

A name that describes the monitor

**threshold** `Float`

Adjust the monitor's alerting threshold

**operator** `ComparisonOperator`

Adjust the monitor's alerting operator. Used in conjunction with the threshold to form an alert condition One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**dynamicAutoThresholdEnabled** `Boolean`

Whether the current monitor threshold value is re-calculated on a regular schedule and thus have a dynamic value that changes over time. Default is false

**dynamicAutoThreshold** `MonitorAutoThresholdInput`

**MonitorAutoThresholdInput fields**

**stdDevMultiplier** `Float!` *required*

A coefficient by which to multiply the standard deviation in the threshold calculation: threshold = mean +/- stdDevMultiplier \* stdDev

**notificationsEnabled** `Boolean`

Whether or not notifications are sent out when the monitor is triggered

**contacts** `[MonitorContactInput!]`

The contacts of the monitor.

**MonitorContactInput fields**

**notificationChannelType** `NotificationChannelType!` *required*

The notification channel type of the monitor contact. One of: `email`, `integration`.

**emailAddress** `EmailAddress`

The email address of the monitor contact. Ex. [steve@arize.com](mailto:steve@arize.com)

**integrationKeyId** `ID`

The integration key id of the integration

**modelVersions** `[String!]`

An array of the model versions by which to filter the dataset. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters on the model's inferences. (ex. narrow the monitor to just the case where state=CA). If this property is provided it will replace any existing filters.

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**notes** `String`

Notes on the monitor

**startDelaySeconds** `PositiveInt`

The number of seconds to wait before starting the monitor. Between 0 and 15552000 (180 days)

**downtimeStart** `DateTime`

The start date and hour of the monitor's downtime if scheduled (ex: 2024-12-01T10:00:00Z).

**downtimeDurationHrs** `PositiveInt`

Duration of downtime for a monitor in number of hours. Between 1 and 1344 hours

**downtimeFrequencyDays** `PositiveInt`

Frequency of downtime for a monitor in number of days. Between 1 and 56 days

**scheduledRuntimeEnabled** `Boolean`

If true, the monitor is scheduled to run at a specific time.

**scheduledRuntimeCadenceSeconds** `Int`

The cadence of the monitor's scheduled runtime in seconds.

**scheduledRuntimeDaysOfWeek** `[Int!]`

The days of the week the monitor is scheduled to run.

**threshold2** `Float`

The second threshold of the monitor, if using a range threshold.

**operator2** `ComparisonOperator`

The second operator of the monitor, if using a range threshold. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**stdDevMultiplier2** `Float`

The second standard deviation multiplier, if using a range threshold. Used to determine the suggested threshold for the monitor.

**thresholdMode** `MonitorThresholdMode`

The threshold mode of the monitor, either single or range. One of: `single`, `range`.

**autoThresholdLookbackSeconds** `Int`

The lookback seconds for the auto threshold.

**thresholdCalculationType** `MonitorThresholdCalculationType`

Calculation used for auto thresholds. Either mean + stdev or median + median absolute deviation (mad). One of: `stdev`, `mad`.

**manualEvaluationEnabled** `Boolean`

Whether manual evaluation is enabled.

**evaluationWindowLengthSeconds** `Float`

The evaluation window length of the monitor in seconds.

**movingWindowSeconds** `Float`

The moving window length of the monitor in seconds.

**movingWindowDelaySeconds** `Float`

The moving window delay of the monitor in seconds.

**clientMutationId** `String`

#### Returns

**monitor** `Monitor!`

The updated data quality monitor.

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation PatchDataQualityMonitor($input: PatchDataQualityMonitorInput!) {
  patchDataQualityMonitor(input: $input) {
    monitor { id name status }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "monitorId": "<ID>",
    "set": {}
  }
}
```

### patchMonitor

`patchMonitor(input: PatchMonitorInput!): PatchMonitorPayload`

#### Arguments

**input** `PatchMonitorInput!` *required*

**PatchMonitorInput fields**

**monitorId** `ID!` *required*

The ID of the monitor to patch

**set** `MonitorPatchInput!` *required*

Patch of the monitor calculation

**MonitorPatchInput fields**

**name** `String`

A name that describes the monitor

**threshold** `Float`

Adjust the monitor's alerting threshold

**operator** `ComparisonOperator`

Adjust the monitor's alerting operator. Used in conjunction with the threshold to form an alert condition One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**dynamicAutoThresholdEnabled** `Boolean`

Whether the current monitor threshold value is re-calculated on a regular schedule and thus have a dynamic value that changes over time. Default is false

**dynamicAutoThreshold** `MonitorAutoThresholdInput`

**MonitorAutoThresholdInput fields**

**stdDevMultiplier** `Float!` *required*

A coefficient by which to multiply the standard deviation in the threshold calculation: threshold = mean +/- stdDevMultiplier \* stdDev

**notificationsEnabled** `Boolean`

Whether or not notifications are sent out when the monitor is triggered

**contacts** `[MonitorContactInput!]`

The contacts of the monitor.

**MonitorContactInput fields**

**notificationChannelType** `NotificationChannelType!` *required*

The notification channel type of the monitor contact. One of: `email`, `integration`.

**emailAddress** `EmailAddress`

The email address of the monitor contact. Ex. [steve@arize.com](mailto:steve@arize.com)

**integrationKeyId** `ID`

The integration key id of the integration

**modelVersions** `[String!]`

An array of the model versions by which to filter the dataset. An empty array will fetch all versions

**filters** `[DimensionFilterInput!]`

The filters on the model's inferences. (ex. narrow the monitor to just the case where state=CA). If this property is provided it will replace any existing filters.

**DimensionFilterInput fields**

**dimensionType** `DimensionFilterType!` *required*

The part of the model to filter on. One of: `featureLabel`, `tagLabel`, `predictionValue`, `actuals`, `predictionClass`, `predictionScore`, `actualClass`, `actualScore`, `spanProperty`, `llmEval`.

**operator** `ComparisonOperator!` *required*

The operator of the filter. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**name** `String`

Required when specifying a tag or a feature label filter.

**values** `[String!]!` *required*

The values to match on.

**notes** `String`

Notes on the monitor

**startDelaySeconds** `PositiveInt`

The number of seconds to wait before starting the monitor. Between 0 and 15552000 (180 days)

**downtimeStart** `DateTime`

The start date and hour of the monitor's downtime if scheduled (ex: 2024-12-01T10:00:00Z).

**downtimeDurationHrs** `PositiveInt`

Duration of downtime for a monitor in number of hours. Between 1 and 1344 hours

**downtimeFrequencyDays** `PositiveInt`

Frequency of downtime for a monitor in number of days. Between 1 and 56 days

**scheduledRuntimeEnabled** `Boolean`

If true, the monitor is scheduled to run at a specific time.

**scheduledRuntimeCadenceSeconds** `Int`

The cadence of the monitor's scheduled runtime in seconds.

**scheduledRuntimeDaysOfWeek** `[Int!]`

The days of the week the monitor is scheduled to run.

**threshold2** `Float`

The second threshold of the monitor, if using a range threshold.

**operator2** `ComparisonOperator`

The second operator of the monitor, if using a range threshold. One of: `greaterThan`, `lessThan`, `equals`, `notEquals`, `greaterThanOrEqual`, `lessThanOrEqual`, `topN`, `contains`, `containsString`, `similarTo`.

**stdDevMultiplier2** `Float`

The second standard deviation multiplier, if using a range threshold. Used to determine the suggested threshold for the monitor.

**thresholdMode** `MonitorThresholdMode`

The threshold mode of the monitor, either single or range. One of: `single`, `range`.

**autoThresholdLookbackSeconds** `Int`

The lookback seconds for the auto threshold.

**thresholdCalculationType** `MonitorThresholdCalculationType`

Calculation used for auto thresholds. Either mean + stdev or median + median absolute deviation (mad). One of: `stdev`, `mad`.

**manualEvaluationEnabled** `Boolean`

Whether manual evaluation is enabled.

**evaluationWindowLengthSeconds** `Float`

The evaluation window length of the monitor in seconds.

**movingWindowSeconds** `Float`

The moving window length of the monitor in seconds.

**movingWindowDelaySeconds** `Float`

The moving window delay of the monitor in seconds.

**clientMutationId** `String`

#### Returns

**monitor** `Monitor!`

The updated monitor.

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation PatchMonitor($input: PatchMonitorInput!) {
  patchMonitor(input: $input) {
    monitor { id name status }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "monitorId": "<ID>",
    "set": {}
  }
}
```

### triggerMonitor

Manually trigger a monitor

`triggerMonitor(input: TriggerMonitorInput!): TriggerMonitorPayload`

#### Arguments

**input** `TriggerMonitorInput!` *required*

**TriggerMonitorInput fields**

**monitorId** `ID!` *required*

**clientMutationId** `String`

#### Returns

**success** `Boolean!`

Whether the monitor was successfully triggered

**monitor** `Monitor`

The monitor the evaluation was run on

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation TriggerMonitor($input: TriggerMonitorInput!) {
  triggerMonitor(input: $input) {
    success
    monitor { id name status }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "monitorId": "<ID>"
  }
}
```

### deleteMonitor

`deleteMonitor(input: DeleteMonitorMutationInput!): DeleteMonitorMutationPayload`

#### Arguments

**input** `DeleteMonitorMutationInput!` *required*

**DeleteMonitorMutationInput fields**

**monitorId** `ID!` *required*

**clientMutationId** `String`

#### Returns

**monitor** `Monitor`

**Monitor fields**

Scalar fields: `id`, `name`, `uri`, `createdDate`, `monitorCategory`, `evaluationIntervalSeconds`, `evaluatedAt`, `threshold`, `thresholdMode`, `threshold2`, `latestComputedValue`, `autoThresholdEnabled`, `dynamicAutoThresholdEnabled`, `stdDevMultiplier`, `stdDevMultiplier2`, `topKPercentileValue`, `operator`, `operator2`, `driftMetric`, `dimensionCategory`, `performanceMetric`, `dataQualityMetric`, `positiveClassValue`, `metricAtRankingKValue`, `isTriggered`, `status`, `isManaged`, `notificationsEnabled`, `notes`, `updatedAt`, `downtimeStart`, `downtimeDurationHrs`, `downtimeFrequencyDays`, `scheduledRuntimeEnabled`, `scheduledRuntimeCadenceSeconds`, `scheduledRuntimeDaysOfWeek`, `autoThresholdLookbackSeconds`, `thresholdCalculationType`, `manualEvaluationEnabled`.

Object fields (select subfields): `space`, `creator`, `calculationsWithinTimeRange`, `stateChangesWithinTimeRange`, `customMetric`, `primaryMetricWindow`, `comparisonMetricWindow`, `contacts`, `webhookSubscriptions`, `auditLog`, `metricHistory`, `tags`.

**model** `Model`

**Model fields**

Scalar fields: `id`, `name`, `uri`, `createdAt`, `isDemoModel`, `isRestricted`, `modelType`, `modelEnvironmentNames`, `averagePerformanceMetric`, `totalTraffic`, `taskVariables`, `annotationsEnabled`, `isAgentExperimentTraceProject`, `projectType`, `annotationsDisabled`, `defaultAnnotationConfigIds`.

Object fields (select subfields): `projectRoleBindings`, `space`, `volumeGateVisibility`, `modelVersions`, `modelBatches`, `modelPredictionVolume`, `modelEnvironments`, `dimension`, `dimensionValues`, `tracingSchema`, `modelSchema`, `modelPrimaryBaseline`, `modelReferenceDataset`, `modelDashboards`, `monitors`, `signalStatus`, `signalIssues`, `signalIssueActivityBounds`, `signalIssueCountsByEntity`, `signalIssueTimeSeries`, `monitorAggregations`, `driftConfigs`, `performanceConfigs`, `dataQualityConfigs`, `modelColumnMappingConfigs`, `projectSourceMappingConfigs`, `performanceMetrics`, `performanceStatus`, `performanceMetricOverTime`, `customMetrics`, `driftStatus`, `dataQualityStatus`, `UMAPPoints`, `spanRecordsPublic`, `costOverTime`, `tokensOverTime`, `costByModel`, `llmTracingStats`, `network`, `tags`, `_access`.

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
mutation DeleteMonitor($input: DeleteMonitorMutationInput!) {
  deleteMonitor(input: $input) {
    monitor { id name status }
    model { id name }
  }
}
```

```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "input": {
    "monitorId": "<ID>"
  }
}
```
