Expectation Incidents

An ExpectationIncident groups ongoing failure behavior for an Expectation over time.

List Expectation Incidents

Endpoint

GET/expectation_incidents

Return Object

ExpectationIncident[]

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_incidents.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

[
  {
    "id": 1,
    "workspace_id": 1,
    "expectation_id": 1,
    "status": "open",
    "opened_at": "2000-01-01T01:00:00Z",
    "last_failed_at": "2000-01-01T01:00:00Z",
    "acknowledged_at": "2000-01-01T01:00:00Z",
    "snoozed_until": "2000-01-01T01:00:00Z",
    "resolved_at": "2000-01-01T01:00:00Z",
    "opened_by_evaluation_id": 1,
    "last_evaluation_id": 2,
    "resolved_by_evaluation_id": 3,
    "summary": {
    },
    "created_at": "2000-01-01T01:00:00Z",
    "updated_at": "2000-01-01T01:00:00Z"
  }
]

Show Expectation Incident

Endpoint

GET/expectation_incidents/{id}

Return Object

ExpectationIncident

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 Incident ID.

Example Request

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

Example Response

{
  "id": 1,
  "workspace_id": 1,
  "expectation_id": 1,
  "status": "open",
  "opened_at": "2000-01-01T01:00:00Z",
  "last_failed_at": "2000-01-01T01:00:00Z",
  "acknowledged_at": "2000-01-01T01:00:00Z",
  "snoozed_until": "2000-01-01T01:00:00Z",
  "resolved_at": "2000-01-01T01:00:00Z",
  "opened_by_evaluation_id": 1,
  "last_evaluation_id": 2,
  "resolved_by_evaluation_id": 3,
  "summary": {
  },
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

Resolve an expectation incident

Endpoint

POST/expectation_incidents/{id}/resolve

Return Object

ExpectationIncident

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 Incident ID.

Example Request

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

Example Response

{
  "id": 1,
  "workspace_id": 1,
  "expectation_id": 1,
  "status": "open",
  "opened_at": "2000-01-01T01:00:00Z",
  "last_failed_at": "2000-01-01T01:00:00Z",
  "acknowledged_at": "2000-01-01T01:00:00Z",
  "snoozed_until": "2000-01-01T01:00:00Z",
  "resolved_at": "2000-01-01T01:00:00Z",
  "opened_by_evaluation_id": 1,
  "last_evaluation_id": 2,
  "resolved_by_evaluation_id": 3,
  "summary": {
  },
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

Snooze an expectation incident until a specified time

Endpoint

POST/expectation_incidents/{id}/snooze

Return Object

ExpectationIncident

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 Incident ID.
snoozed_until
string
Required
Time until which the incident should remain snoozed.

Example Request

curl https://app.files.com/api/rest/v1/expectation_incidents/{id}/snooze.json \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"snoozed_until":"snoozed_until"}' \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "workspace_id": 1,
  "expectation_id": 1,
  "status": "open",
  "opened_at": "2000-01-01T01:00:00Z",
  "last_failed_at": "2000-01-01T01:00:00Z",
  "acknowledged_at": "2000-01-01T01:00:00Z",
  "snoozed_until": "2000-01-01T01:00:00Z",
  "resolved_at": "2000-01-01T01:00:00Z",
  "opened_by_evaluation_id": 1,
  "last_evaluation_id": 2,
  "resolved_by_evaluation_id": 3,
  "summary": {
  },
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

Acknowledge an expectation incident

Endpoint

POST/expectation_incidents/{id}/acknowledge

Return Object

ExpectationIncident

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 Incident ID.

Example Request

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

Example Response

{
  "id": 1,
  "workspace_id": 1,
  "expectation_id": 1,
  "status": "open",
  "opened_at": "2000-01-01T01:00:00Z",
  "last_failed_at": "2000-01-01T01:00:00Z",
  "acknowledged_at": "2000-01-01T01:00:00Z",
  "snoozed_until": "2000-01-01T01:00:00Z",
  "resolved_at": "2000-01-01T01:00:00Z",
  "opened_by_evaluation_id": 1,
  "last_evaluation_id": 2,
  "resolved_by_evaluation_id": 3,
  "summary": {
  },
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

The ExpectationIncident Object

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

AttributeDescription
id
int64
Expectation Incident ID
workspace_id
int64
Workspace ID. 0 means the default workspace.
expectation_id
int64
Expectation ID.
status
string
Incident status.
Possible values: open, acknowledged, snoozed, resolved
opened_at
date-time
When the incident was opened.
last_failed_at
date-time
When the most recent failing evaluation contributing to the incident occurred.
acknowledged_at
date-time
When the incident was acknowledged.
snoozed_until
date-time
When the current snooze expires.
resolved_at
date-time
When the incident was resolved.
opened_by_evaluation_id
int64
Evaluation that first opened the incident.
last_evaluation_id
int64
Most recent evaluation linked to the incident.
resolved_by_evaluation_id
int64
Evaluation that resolved the incident.
summary
object
Compact incident summary payload.
created_at
date-time
Creation time.
updated_at
date-time
Last update time.

Example ExpectationIncident Object

{
  "id": 1,
  "workspace_id": 1,
  "expectation_id": 1,
  "status": "open",
  "opened_at": "2000-01-01T01:00:00Z",
  "last_failed_at": "2000-01-01T01:00:00Z",
  "acknowledged_at": "2000-01-01T01:00:00Z",
  "snoozed_until": "2000-01-01T01:00:00Z",
  "resolved_at": "2000-01-01T01:00:00Z",
  "opened_by_evaluation_id": 1,
  "last_evaluation_id": 2,
  "resolved_by_evaluation_id": 3,
  "summary": {
  },
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}