Expectation Evaluations

An ExpectationEvaluation records one open or closed window for an Expectation.

List Expectation Evaluations

Endpoint

GET/expectation_evaluations

Return Object

ExpectationEvaluation[]

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

curl https://app.files.com/api/rest/v1/expectation_evaluations.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

[
  {
    "id": 1,
    "workspace_id": 1,
    "expectation_id": 1,
    "status": "open",
    "opened_via": "manual",
    "opened_at": "2000-01-01T01:00:00Z",
    "window_start_at": "2000-01-01T01:00:00Z",
    "window_end_at": "2000-01-01T01:00:00Z",
    "deadline_at": "2000-01-01T01:00:00Z",
    "late_acceptance_cutoff_at": "2000-01-01T01:00:00Z",
    "hard_close_at": "2000-01-01T01:00:00Z",
    "closed_at": "2000-01-01T01:00:00Z",
    "matched_files": [

    ],
    "missing_files": [

    ],
    "criteria_errors": [
      "count expected exactly 2, got 1"
    ],
    "summary": {
    },
    "created_at": "2000-01-01T01:00:00Z",
    "updated_at": "2000-01-01T01:00:00Z"
  }
]

Show Expectation Evaluation

Endpoint

GET/expectation_evaluations/{id}

Return Object

ExpectationEvaluation

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Request Parameters

ParameterDescription
id
int64
Required
Expectation Evaluation ID.

Example Request

curl https://app.files.com/api/rest/v1/expectation_evaluations/{id}.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "workspace_id": 1,
  "expectation_id": 1,
  "status": "open",
  "opened_via": "manual",
  "opened_at": "2000-01-01T01:00:00Z",
  "window_start_at": "2000-01-01T01:00:00Z",
  "window_end_at": "2000-01-01T01:00:00Z",
  "deadline_at": "2000-01-01T01:00:00Z",
  "late_acceptance_cutoff_at": "2000-01-01T01:00:00Z",
  "hard_close_at": "2000-01-01T01:00:00Z",
  "closed_at": "2000-01-01T01:00:00Z",
  "matched_files": [

  ],
  "missing_files": [

  ],
  "criteria_errors": [
    "count expected exactly 2, got 1"
  ],
  "summary": {
  },
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

Manually open an Expectation window

Endpoint

POST/expectations/{id}/trigger_evaluation

Return Object

ExpectationEvaluation

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Request Parameters

ParameterDescription
id
int64
Required
Expectation ID.

Example Request

curl https://app.files.com/api/rest/v1/expectations/{id}/trigger_evaluation.json \
  -X POST \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "workspace_id": 1,
  "expectation_id": 1,
  "status": "open",
  "opened_via": "manual",
  "opened_at": "2000-01-01T01:00:00Z",
  "window_start_at": "2000-01-01T01:00:00Z",
  "window_end_at": "2000-01-01T01:00:00Z",
  "deadline_at": "2000-01-01T01:00:00Z",
  "late_acceptance_cutoff_at": "2000-01-01T01:00:00Z",
  "hard_close_at": "2000-01-01T01:00:00Z",
  "closed_at": "2000-01-01T01:00:00Z",
  "matched_files": [

  ],
  "missing_files": [

  ],
  "criteria_errors": [
    "count expected exactly 2, got 1"
  ],
  "summary": {
  },
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

The ExpectationEvaluation Object

Some of the endpoints above return a ExpectationEvaluation object. The attributes of this object are listed below.

AttributeDescription
id
int64
ExpectationEvaluation ID
workspace_id
int64
Workspace ID. 0 means the default workspace.
expectation_id
int64
Expectation ID.
status
string
Evaluation status.
Possible values: open, success, late, missing, invalid
opened_via
string
How the evaluation window was opened.
Possible values: schedule, manual, upload
opened_at
date-time
When the evaluation row was opened.
window_start_at
date-time
Logical start of the candidate window.
window_end_at
date-time
Actual candidate cutoff boundary for the window.
deadline_at
date-time
Logical due boundary for schedule-driven windows.
late_acceptance_cutoff_at
date-time
Logical cutoff for late acceptance, when present.
hard_close_at
date-time
Hard stop after which the window may not remain open.
closed_at
date-time
When the evaluation row was finalized.
matched_files
array(object)
Captured evidence for files that matched the window.
missing_files
array(object)
Captured evidence for required files that were missing.
criteria_errors
array(string)
Captured criteria failures for the window, including file-scoped FTS errors and returned validation details.
summary
object
Compact evaluator summary payload.
created_at
date-time
Creation time.
updated_at
date-time
Last update time.

Example ExpectationEvaluation Object

{
  "id": 1,
  "workspace_id": 1,
  "expectation_id": 1,
  "status": "open",
  "opened_via": "manual",
  "opened_at": "2000-01-01T01:00:00Z",
  "window_start_at": "2000-01-01T01:00:00Z",
  "window_end_at": "2000-01-01T01:00:00Z",
  "deadline_at": "2000-01-01T01:00:00Z",
  "late_acceptance_cutoff_at": "2000-01-01T01:00:00Z",
  "hard_close_at": "2000-01-01T01:00:00Z",
  "closed_at": "2000-01-01T01:00:00Z",
  "matched_files": [

  ],
  "missing_files": [

  ],
  "criteria_errors": [
    "count expected exactly 2, got 1"
  ],
  "summary": {
  },
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}