Expectation Incidents

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

List Expectation Incidents

SDK Function

ExpectationIncident.list()

Return Object

ListIterator<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

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ExpectationIncident;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<ExpectationIncident> expectationIncidents = ExpectationIncident.list(parameters);
  for (ExpectationIncident expectationIncident : expectationIncidents.listAutoPaging()) {
    // Operate on expectationIncident
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Show Expectation Incident

SDK Function

ExpectationIncident.find()

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.

Function Arguments

ArgumentDescription
id
int64
Required
Expectation Incident ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ExpectationIncident;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ExpectationIncident expectationIncident = ExpectationIncident.find(id, parameters);
  // Operate on expectationIncident
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Resolve an expectation incident

SDK Function

expectationIncident.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.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ExpectationIncident;

try {
  // Find the expectationIncident object by its id.
  ExpectationIncident expectationIncident = ExpectationIncident.find(id, null);
  expectationIncident.resolve(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Snooze an expectation incident until a specified time

SDK Function

expectationIncident.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.

Attribute Setters

SetterDescription
setSnoozedUntil
string
Required
Time until which the incident should remain snoozed.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ExpectationIncident;

try {
  // Find the expectationIncident object by its id.
  ExpectationIncident expectationIncident = ExpectationIncident.find(id, null);
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("snoozed_until", "snoozed_until");
  expectationIncident.snooze(parameters);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Acknowledge an expectation incident

SDK Function

expectationIncident.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.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.ExpectationIncident;

try {
  // Find the expectationIncident object by its id.
  ExpectationIncident expectationIncident = ExpectationIncident.find(id, null);
  expectationIncident.acknowledge(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The ExpectationIncident Object

Some of the functions 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.