v4

latestSwagger 2.02026-08-0343714211.7 MB
expectations
Expectations

Create Expectation

Create Expectation

post/expectations

Response

The Expectations object.

idinteger

Expectation ID

workspace_idinteger

Workspace ID. 0 means the default workspace.

namestring

Expectation name.

descriptionstring

Expectation description.

pathstring

Path scope for the expectation. Supports workspace-relative presentation.

sourcestring

Source glob used to select candidate files.

exclude_patternstring

Optional source exclusion glob.

disabledboolean

If true, the expectation is disabled.

expectations_versioninteger

Criteria schema version for this expectation.

trigger'manual' | 'upload' | 'daily' | 'custom_schedule'

How this expectation opens windows.

intervalstring

If trigger is daily, this specifies how often to run the expectation.

recurring_dayinteger

If trigger is daily, this selects the day number inside the chosen interval.

schedule_days_of_weekinteger[]

If trigger is custom_schedule, the 0-based weekdays used by the schedule.

schedule_times_of_daystring[]

Times of day in HH:MM format for schedule-driven expectations.

schedule_time_zonestring

Time zone used by the expectation schedule.

holiday_regionstring

Optional holiday region used by schedule-driven expectations.

lookback_intervalinteger

How many seconds before the due boundary the window starts.

late_acceptance_intervalinteger

How many seconds a schedule-driven window may remain eligible to close as late.

inactivity_intervalinteger

How many quiet seconds are required before final closure.

max_open_intervalinteger

Hard-stop duration in seconds for unscheduled expectations.

criteriaobject

Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.

last_evaluated_atstring date-time

Last time this expectation was evaluated.

last_success_atstring date-time

Last time this expectation closed successfully.

last_failure_atstring date-time

Last time this expectation closed with a failure result.

last_result'success' | 'late' | 'missing' | 'invalid'

Most recent terminal result for this expectation.

created_atstring date-time

Creation time.

updated_atstring date-time

Last update time.

Example response

{
  "id": 1,
  "name": "Daily Vendor Feed",
  "description": "Wait for the vendor CSV every morning.",
  "path": "incoming/vendor_a",
  "source": "*.csv",
  "exclude_pattern": "*.tmp",
  "disabled": true,
  "expectations_version": 2,
  "trigger": "manual",
  "interval": "day",
  "recurring_day": 3,
  "schedule_days_of_week": [
    1,
    3,
    5
  ],
  "schedule_times_of_day": [
    "06:00"
  ],
  "schedule_time_zone": "UTC",
  "holiday_region": "us",
  "lookback_interval": 3600,
  "late_acceptance_interval": 900,
  "inactivity_interval": 300,
  "max_open_interval": 43200,
  "criteria": {
    "count": {
      "exact": 1
    },
    "extensions": [
      "csv"
    ]
  },
  "last_evaluated_at": "2000-01-01T01:00:00Z",
  "last_success_at": "2000-01-01T01:00:00Z",
  "last_failure_at": "2000-01-01T01:00:00Z",
  "last_result": "success",
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}