Skip to main content
PATCH
/
api
/
v1
/
monitors
/
{id}
/
update
Update a Monitor
curl --request PATCH \
  --url https://app.datafold.com/api/v1/monitors/{id}/update \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "alert": {
    "different_rows_count": 123,
    "different_rows_percent": 123
  },
  "datadiff": {
    "column_remapping": {},
    "columns_to_compare": [
      "<string>"
    ],
    "ignore_string_case": true,
    "materialize_results": true,
    "primary_key": [
      "<string>"
    ],
    "sampling": {
      "confidence": 123,
      "tolerance": 123,
      "threshold": 123
    },
    "timeseries_dimension_column": "<string>",
    "tolerance": {
      "float": {
        "column_tolerance": {},
        "default": {
          "value": 123,
          "type": "relative"
        }
      }
    }
  },
  "description": "<string>",
  "name": "<string>",
  "notifications": [
    {
      "recipients": [
        "<string>"
      ],
      "features": [
        "attach_csv"
      ],
      "type": "email"
    }
  ],
  "schedule": {
    "interval": {
      "every": "<string>",
      "type": "hourly"
    }
  },
  "tags": [
    "<string>"
  ]
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Use the 'Authorization' header with the format 'Key '

Path Parameters

id
integer
required

The unique identifier of the monitor.

Body

application/json
type
string
required

The type of monitor.

Allowed value: "diff"
alert
Diff Conditions · object

Condition for triggering alerts based on the data diff.

datadiff
In-Database · object

Configuration for the data diff.

description
string | null

The description of the monitor.

name
string | null

The name of the monitor.

notifications
(Email · object | PagerDuty · object | Webhook · object | Slack · object | Teams · object)[]

Notification configuration for the monitor.

schedule
Interval · object

The schedule at which the monitor runs.

tags
string[]

Tags associated with the monitor.

Response

Successful Response