Expectation Incidents

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

List Expectation Incidents

SDK Method

ExpectationIncident.List();

Return Object

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

using FilesCom.Models;

try
{
    var expectationIncidentIterator = ExpectationIncident.List();
    foreach (ExpectationIncident expectationIncident in expectationIncidentIterator.ListAutoPaging()) {
        // Operate on expectationIncident
    }
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Show Expectation Incident

SDK Method

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.

Method Arguments

ArgumentDescription
id
int64
Required
Expectation Incident ID.

Example Request

using FilesCom.Models;

try
{
    var expectationIncident = await ExpectationIncident.Find(id);
    // Operate on expectationIncident
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Resolve an expectation incident

SDK Method

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

using FilesCom.Models;

try
{
    // Find the expectationIncident object by its id.
    var expectationIncident = await ExpectationIncident.Find(id);
    await expectationIncident.Resolve();
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Snooze an expectation incident until a specified time

SDK Method

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.

Method Arguments

ArgumentDescription
snoozed_until
string
Required
Time until which the incident should remain snoozed.

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("snoozed_until", "snoozed_until");

try
{
    // Find the expectationIncident object by its id.
    var expectationIncident = await ExpectationIncident.Find(id);
    await expectationIncident.Snooze(parameters);
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Acknowledge an expectation incident

SDK Method

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

using FilesCom.Models;

try
{
    // Find the expectationIncident object by its id.
    var expectationIncident = await ExpectationIncident.Find(id);
    await expectationIncident.Acknowledge();
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

The ExpectationIncident Object

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