POST
/
api
/
v1
/
monitors
/
create
/
diff
curl --request POST \
  --url https://app.datafold.com/api/v1/monitors/create/diff \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "alert": {
    "different_rows_count": 123,
    "different_rows_percent": 123
  },
  "datadiff": {
    "column_remapping": {},
    "columns_to_compare": [
      "<string>"
    ],
    "dataset_a": {
      "connection_id": 123,
      "filter": "<string>",
      "session_parameters": {},
      "table": "<string>",
      "time_travel_point": "<string>"
    },
    "dataset_b": {
      "connection_id": 123,
      "filter": "<string>",
      "session_parameters": {},
      "table": "<string>",
      "time_travel_point": "<string>"
    },
    "ignore_string_case": false,
    "materialize_results": false,
    "primary_key": [
      "<string>"
    ],
    "sampling": {
      "confidence": 123,
      "threshold": 123,
      "tolerance": 123
    },
    "timeseries_dimension_column": "<string>"
  },
  "description": "<string>",
  "enabled": true,
  "name": "<string>",
  "notifications": [
    {
      "recipients": [
        "<string>"
      ],
      "type": "<string>"
    }
  ],
  "schedule": {
    "interval": {
      "every": "<string>",
      "type": "hourly"
    }
  },
  "tags": [
    "<string>"
  ]
}'
{
  "id": 123
}

Authorizations

Authorization
string
header
required

Use the 'Authorization' header with the format 'Key <api-key>'

Body

application/json
datadiff
object
required

Configuration for the data diff.

name
string
required

The name of the monitor.

schedule
object
required

The schedule at which the monitor runs.

alert
object | null

Condition for triggering alerts based on the data diff.

description
string | null

The description of the monitor.

enabled
boolean
default:
true

Indicates whether the monitor is enabled.

notifications
object[]

Notification configuration for the monitor.

tags
string[]

Tags associated with the monitor.

Response

200
application/json
Successful Response
id
integer
required

Unique identifier for the monitor.