Interface DataAlertsAPI

interface DataAlertsAPI {
    clearCache: () => void;
    createDataAlert: (
        body: AlertingTaskCreateRequest,
        options?: ApiCallOptions,
    ) => Promise<CreateDataAlertHttpResponse>;
    deleteDataAlert: (
        alertId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteDataAlertHttpResponse>;
    deleteDataAlertExecution: (
        alertId: string,
        executionId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteDataAlertExecutionHttpResponse>;
    getDataAlert: (
        alertId: string,
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertHttpResponse>;
    getDataAlertCondition: (
        alertId: string,
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertConditionHttpResponse>;
    getDataAlertExecution: (
        alertId: string,
        executionId: string,
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertExecutionHttpResponse>;
    getDataAlertExecutionEvaluations: (
        taskId: string,
        executionId: string,
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertExecutionEvaluationsHttpResponse>;
    getDataAlertExecutions: (
        taskId: string,
        query: {
            conditionId?: string;
            conditionStatus?: "FAILED" | "FINISHED" | "ALL";
            daysOfMonth?: number[];
            daysOfWeek?: (
                | "MONDAY"
                | "TUESDAY"
                | "WEDNESDAY"
                | "THURSDAY"
                | "FRIDAY"
                | "SATURDAY"
                | "SUNDAY"
            )[];
            fields?: (
                | "evaluationId"
                | "triggerTime"
                | "conditionStatus"
                | "executionEvaluationStatus"
                | "evaluation"
                | "evaluation.endTime"
                | "evaluation.resultData"
                | "evaluation.resultData.count"
                | "evaluation.resultData.headers"
                | "evaluation.resultData.positive"
                | "evaluation.resultData.negative"
                | "evaluation.resultData.dimensions"
                | "evaluation.resultData.measures"
            )[];
            includeEvaluation?: boolean;
            lastEachDay?: boolean;
            limit?: number;
            minimumGapDays?: number;
            next?: string;
            offset?: number;
            prev?: string;
            searchResultsLimit?: number;
            since?: string;
            sort?: ("triggertime" | "-triggertime" | "+triggertime")[];
            timezone?: string;
            triggered?: boolean;
            until?: string;
        },
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertExecutionsHttpResponse>;
    getDataAlertExecutionsStats: (
        taskId: string,
        query: { period: "month" },
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertExecutionsStatsHttpResponse>;
    getDataAlertRecipientStats: (
        alertId: string,
        query: {
            groups?: string[];
            sort?: ("+userID" | "-userID" | "subscribed" | "+subscribed")[];
            subscribed?: boolean;
            userID?: string;
        },
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertRecipientStatsHttpResponse>;
    getDataAlerts: (
        query: {
            appID?: string;
            conditionId?: string;
            limit?: number;
            next?: string;
            offset?: number;
            ownerId?: string;
            ownerName?: string;
            prev?: string;
            role?: ("owner" | "recipient" | "notowner")[];
            sort?: (
                | "status"
                | "name"
                | "+status"
                | "-status"
                | "-name"
                | "+name"
                | "enabled"
                | "-datecreated"
                | "datecreated"
                | "+datecreated"
                | "-ownername"
                | "ownername"
                | "+ownername"
                | "lasttrigger"
                | "-lasttrigger"
                | "+lasttrigger"
                | "lastscan"
                | "-lastscan"
                | "+lastscan"
                | "-enabled"
                | "+enabled"
                | "nextexecutiontime"
                | "-nextexecutiontime"
                | "+nextexecutiontime"
            )[];
            status?: ("INVALID_RECIPIENT" | "INVALID_OWNER" | "DISABLED" | "VALID")[];
        },
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertsHttpResponse>;
    getDataAlertsSettings: (
        options?: ApiCallOptions,
    ) => Promise<GetDataAlertsSettingsHttpResponse>;
    patchDataAlert: (
        alertId: string,
        body: AlertingTaskPatchRequestCompliantList,
        options?: ApiCallOptions,
    ) => Promise<PatchDataAlertHttpResponse>;
    setDataAlertsSettings: (
        body: AlertingSettingsUpload,
        options?: ApiCallOptions,
    ) => Promise<SetDataAlertsSettingsHttpResponse>;
    triggerDataAlerts: (
        body: AlertingActionsTriggerCreateRequest,
        options?: ApiCallOptions,
    ) => Promise<TriggerDataAlertsHttpResponse>;
    validateDataAlerts: (
        body: AlertingTaskCreateRequest,
        options?: ApiCallOptions,
    ) => Promise<ValidateDataAlertsHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for data-alerts api requests.

Type declaration

    • (): void
    • Clears the cache for data-alerts api requests.

      Returns void

createDataAlert: (
    body: AlertingTaskCreateRequest,
    options?: ApiCallOptions,
) => Promise<CreateDataAlertHttpResponse>

Creates a new data alerting task.

Type declaration

an object with the body content

CreateDataAlertHttpError

deleteDataAlert: (
    alertId: string,
    options?: ApiCallOptions,
) => Promise<DeleteDataAlertHttpResponse>

Deletes a specific data alerting task.

Type declaration

The alerting task identifier.

DeleteDataAlertHttpError

deleteDataAlertExecution: (
    alertId: string,
    executionId: string,
    options?: ApiCallOptions,
) => Promise<DeleteDataAlertExecutionHttpResponse>

Deletes a specific data alerting task execution.

Type declaration

The alerting task identifier.

The execution identifier.

DeleteDataAlertExecutionHttpError

getDataAlert: (
    alertId: string,
    options?: ApiCallOptions,
) => Promise<GetDataAlertHttpResponse>

Returns the details of a specific data alert task.

Type declaration

The alerting task identifier.

GetDataAlertHttpError

getDataAlertCondition: (
    alertId: string,
    options?: ApiCallOptions,
) => Promise<GetDataAlertConditionHttpResponse>

Retrieves the condition associated with a data alerting task.

Type declaration

The alerting task identifier.

GetDataAlertConditionHttpError

getDataAlertExecution: (
    alertId: string,
    executionId: string,
    options?: ApiCallOptions,
) => Promise<GetDataAlertExecutionHttpResponse>

Retrieves a specific execution for the specified data alerting task.

Type declaration

    • (
          alertId: string,
          executionId: string,
          options?: ApiCallOptions,
      ): Promise<GetDataAlertExecutionHttpResponse>
    • Retrieves a specific execution for the specified data alerting task.

      Parameters

      • alertId: string

        The alerting task identifier.

      • executionId: string

        The execution identifier. If value is "latest", the latest execution will be returned

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetDataAlertExecutionHttpResponse>

      GetDataAlertExecutionHttpError

The alerting task identifier.

The execution identifier. If value is "latest", the latest execution will be returned

GetDataAlertExecutionHttpError

getDataAlertExecutionEvaluations: (
    taskId: string,
    executionId: string,
    options?: ApiCallOptions,
) => Promise<GetDataAlertExecutionEvaluationsHttpResponse>

Retrieves the content of an evaluation for a specified data alerting task execution.

Type declaration

The alerting task identifier.

The execution identifier.

GetDataAlertExecutionEvaluationsHttpError

getDataAlertExecutions: (
    taskId: string,
    query: {
        conditionId?: string;
        conditionStatus?: "FAILED" | "FINISHED" | "ALL";
        daysOfMonth?: number[];
        daysOfWeek?: (
            | "MONDAY"
            | "TUESDAY"
            | "WEDNESDAY"
            | "THURSDAY"
            | "FRIDAY"
            | "SATURDAY"
            | "SUNDAY"
        )[];
        fields?: (
            | "evaluationId"
            | "triggerTime"
            | "conditionStatus"
            | "executionEvaluationStatus"
            | "evaluation"
            | "evaluation.endTime"
            | "evaluation.resultData"
            | "evaluation.resultData.count"
            | "evaluation.resultData.headers"
            | "evaluation.resultData.positive"
            | "evaluation.resultData.negative"
            | "evaluation.resultData.dimensions"
            | "evaluation.resultData.measures"
        )[];
        includeEvaluation?: boolean;
        lastEachDay?: boolean;
        limit?: number;
        minimumGapDays?: number;
        next?: string;
        offset?: number;
        prev?: string;
        searchResultsLimit?: number;
        since?: string;
        sort?: ("triggertime" | "-triggertime" | "+triggertime")[];
        timezone?: string;
        triggered?: boolean;
        until?: string;
    },
    options?: ApiCallOptions,
) => Promise<GetDataAlertExecutionsHttpResponse>

Lists executions for the specified data alerting task.

Type declaration

    • (
          taskId: string,
          query: {
              conditionId?: string;
              conditionStatus?: "FAILED" | "FINISHED" | "ALL";
              daysOfMonth?: number[];
              daysOfWeek?: (
                  | "MONDAY"
                  | "TUESDAY"
                  | "WEDNESDAY"
                  | "THURSDAY"
                  | "FRIDAY"
                  | "SATURDAY"
                  | "SUNDAY"
              )[];
              fields?: (
                  | "evaluationId"
                  | "triggerTime"
                  | "conditionStatus"
                  | "executionEvaluationStatus"
                  | "evaluation"
                  | "evaluation.endTime"
                  | "evaluation.resultData"
                  | "evaluation.resultData.count"
                  | "evaluation.resultData.headers"
                  | "evaluation.resultData.positive"
                  | "evaluation.resultData.negative"
                  | "evaluation.resultData.dimensions"
                  | "evaluation.resultData.measures"
              )[];
              includeEvaluation?: boolean;
              lastEachDay?: boolean;
              limit?: number;
              minimumGapDays?: number;
              next?: string;
              offset?: number;
              prev?: string;
              searchResultsLimit?: number;
              since?: string;
              sort?: ("triggertime" | "-triggertime" | "+triggertime")[];
              timezone?: string;
              triggered?: boolean;
              until?: string;
          },
          options?: ApiCallOptions,
      ): Promise<GetDataAlertExecutionsHttpResponse>
    • Lists executions for the specified data alerting task.

      Parameters

      • taskId: string

        The alerting task identifier.

      • query: {
            conditionId?: string;
            conditionStatus?: "FAILED" | "FINISHED" | "ALL";
            daysOfMonth?: number[];
            daysOfWeek?: (
                | "MONDAY"
                | "TUESDAY"
                | "WEDNESDAY"
                | "THURSDAY"
                | "FRIDAY"
                | "SATURDAY"
                | "SUNDAY"
            )[];
            fields?: (
                | "evaluationId"
                | "triggerTime"
                | "conditionStatus"
                | "executionEvaluationStatus"
                | "evaluation"
                | "evaluation.endTime"
                | "evaluation.resultData"
                | "evaluation.resultData.count"
                | "evaluation.resultData.headers"
                | "evaluation.resultData.positive"
                | "evaluation.resultData.negative"
                | "evaluation.resultData.dimensions"
                | "evaluation.resultData.measures"
            )[];
            includeEvaluation?: boolean;
            lastEachDay?: boolean;
            limit?: number;
            minimumGapDays?: number;
            next?: string;
            offset?: number;
            prev?: string;
            searchResultsLimit?: number;
            since?: string;
            sort?: ("triggertime" | "-triggertime" | "+triggertime")[];
            timezone?: string;
            triggered?: boolean;
            until?: string;
        }

        an object with query parameters

        • OptionalconditionId?: string

          Filter by condition id related to the executions.

        • OptionalconditionStatus?: "FAILED" | "FINISHED" | "ALL"

          Filter by whether the alerting task execution status is FINISHED or FAILED.

        • OptionaldaysOfMonth?: number[]

          Specifies required days of the month that the execution was created in

        • OptionaldaysOfWeek?: (
              | "MONDAY"
              | "TUESDAY"
              | "WEDNESDAY"
              | "THURSDAY"
              | "FRIDAY"
              | "SATURDAY"
              | "SUNDAY"
          )[]

          Specifies a filter for custom handled periods of time in which the executions were handled

        • Optionalfields?: (
              | "evaluationId"
              | "triggerTime"
              | "conditionStatus"
              | "executionEvaluationStatus"
              | "evaluation"
              | "evaluation.endTime"
              | "evaluation.resultData"
              | "evaluation.resultData.count"
              | "evaluation.resultData.headers"
              | "evaluation.resultData.positive"
              | "evaluation.resultData.negative"
              | "evaluation.resultData.dimensions"
              | "evaluation.resultData.measures"
          )[]

          Specifies specific properties to be populated

        • OptionalincludeEvaluation?: boolean

          Specifies whether to include evaluation details

        • OptionallastEachDay?: boolean

          Specifies whether to only show the last execution in each day

        • Optionallimit?: number

          Limit the returned result set

        • OptionalminimumGapDays?: number

          Specifies the number of days required between each entry. This should require a sort by triggertime

        • Optionalnext?: string

          The cursor to the next page of data. Only one of next or previous may be specified.

        • Optionaloffset?: number

          Offset for pagination - how many elements to skip

        • Optionalprev?: string

          The cursor to the previous page of data. Only one of next or previous may be specified.

        • OptionalsearchResultsLimit?: number

          Specifies a limit number for the search query, affects total count and is not related to pagination

        • Optionalsince?: string

          Specifies a date that executions should have been created after. Date in RFC3339Nano format, such as 2020-01-01T00:00:00.000Z

        • Optionalsort?: ("triggertime" | "-triggertime" | "+triggertime")[]

          Sort the returned result set by the specified field

        • Optionaltimezone?: string

          Specifies a timezone the other time-based filters in this query should consider. Expecting a momentjs format, such as America/Los_Angeles

        • Optionaltriggered?: boolean

          Filter by whether the alerting task is triggered.

        • Optionaluntil?: string

          Specifies a date that executions should have been created before. Date in RFC3339Nano format, such as 2020-01-01T00:00:00.000Z

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetDataAlertExecutionsHttpResponse>

      GetDataAlertExecutionsHttpError

The alerting task identifier.

an object with query parameters

GetDataAlertExecutionsHttpError

getDataAlertExecutionsStats: (
    taskId: string,
    query: { period: "month" },
    options?: ApiCallOptions,
) => Promise<GetDataAlertExecutionsStatsHttpResponse>

Type declaration

    • (
          taskId: string,
          query: { period: "month" },
          options?: ApiCallOptions,
      ): Promise<GetDataAlertExecutionsStatsHttpResponse>
    • Parameters

      • taskId: string

        The alerting task identifier.

      • query: { period: "month" }

        an object with query parameters

        • period: "month"

          The period by which the stats aggregation needs to be performed.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetDataAlertExecutionsStatsHttpResponse>

      Retrieves stats for overall data alerting task executions.

      GetDataAlertExecutionsStatsHttpError

Retrieves stats for overall data alerting task executions.

The alerting task identifier.

an object with query parameters

GetDataAlertExecutionsStatsHttpError

getDataAlertRecipientStats: (
    alertId: string,
    query: {
        groups?: string[];
        sort?: ("+userID" | "-userID" | "subscribed" | "+subscribed")[];
        subscribed?: boolean;
        userID?: string;
    },
    options?: ApiCallOptions,
) => Promise<GetDataAlertRecipientStatsHttpResponse>

Retrieve the recipient stats for a data alerting task.

Type declaration

    • (
          alertId: string,
          query: {
              groups?: string[];
              sort?: ("+userID" | "-userID" | "subscribed" | "+subscribed")[];
              subscribed?: boolean;
              userID?: string;
          },
          options?: ApiCallOptions,
      ): Promise<GetDataAlertRecipientStatsHttpResponse>
    • Retrieve the recipient stats for a data alerting task.

      Parameters

      • alertId: string

        The alerting task identifier.

      • query: {
            groups?: string[];
            sort?: ("+userID" | "-userID" | "subscribed" | "+subscribed")[];
            subscribed?: boolean;
            userID?: string;
        }

        an object with query parameters

        • Optionalgroups?: string[]

          The name of the groups you would like to filter by

        • Optionalsort?: ("+userID" | "-userID" | "subscribed" | "+subscribed")[]

          Sort the returned result set by the specified field

        • Optionalsubscribed?: boolean

          Subscribed property you would like to filter by

        • OptionaluserID?: string

          The recipients ID you would like to filter by

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetDataAlertRecipientStatsHttpResponse>

      GetDataAlertRecipientStatsHttpError

The alerting task identifier.

an object with query parameters

GetDataAlertRecipientStatsHttpError

getDataAlerts: (
    query: {
        appID?: string;
        conditionId?: string;
        limit?: number;
        next?: string;
        offset?: number;
        ownerId?: string;
        ownerName?: string;
        prev?: string;
        role?: ("owner" | "recipient" | "notowner")[];
        sort?: (
            | "status"
            | "name"
            | "+status"
            | "-status"
            | "-name"
            | "+name"
            | "enabled"
            | "-datecreated"
            | "datecreated"
            | "+datecreated"
            | "-ownername"
            | "ownername"
            | "+ownername"
            | "lasttrigger"
            | "-lasttrigger"
            | "+lasttrigger"
            | "lastscan"
            | "-lastscan"
            | "+lastscan"
            | "-enabled"
            | "+enabled"
            | "nextexecutiontime"
            | "-nextexecutiontime"
            | "+nextexecutiontime"
        )[];
        status?: ("INVALID_RECIPIENT" | "INVALID_OWNER" | "DISABLED" | "VALID")[];
    },
    options?: ApiCallOptions,
) => Promise<GetDataAlertsHttpResponse>

Retrieves all data alert tasks accessible to the user. Users assigned the TenantAdmin or AnalyticsAdmin role can view all tasks.

Type declaration

    • (
          query: {
              appID?: string;
              conditionId?: string;
              limit?: number;
              next?: string;
              offset?: number;
              ownerId?: string;
              ownerName?: string;
              prev?: string;
              role?: ("owner" | "recipient" | "notowner")[];
              sort?: (
                  | "status"
                  | "name"
                  | "+status"
                  | "-status"
                  | "-name"
                  | "+name"
                  | "enabled"
                  | "-datecreated"
                  | "datecreated"
                  | "+datecreated"
                  | "-ownername"
                  | "ownername"
                  | "+ownername"
                  | "lasttrigger"
                  | "-lasttrigger"
                  | "+lasttrigger"
                  | "lastscan"
                  | "-lastscan"
                  | "+lastscan"
                  | "-enabled"
                  | "+enabled"
                  | "nextexecutiontime"
                  | "-nextexecutiontime"
                  | "+nextexecutiontime"
              )[];
              status?: ("INVALID_RECIPIENT" | "INVALID_OWNER" | "DISABLED" | "VALID")[];
          },
          options?: ApiCallOptions,
      ): Promise<GetDataAlertsHttpResponse>
    • Retrieves all data alert tasks accessible to the user. Users assigned the TenantAdmin or AnalyticsAdmin role can view all tasks.

      Parameters

      • query: {
            appID?: string;
            conditionId?: string;
            limit?: number;
            next?: string;
            offset?: number;
            ownerId?: string;
            ownerName?: string;
            prev?: string;
            role?: ("owner" | "recipient" | "notowner")[];
            sort?: (
                | "status"
                | "name"
                | "+status"
                | "-status"
                | "-name"
                | "+name"
                | "enabled"
                | "-datecreated"
                | "datecreated"
                | "+datecreated"
                | "-ownername"
                | "ownername"
                | "+ownername"
                | "lasttrigger"
                | "-lasttrigger"
                | "+lasttrigger"
                | "lastscan"
                | "-lastscan"
                | "+lastscan"
                | "-enabled"
                | "+enabled"
                | "nextexecutiontime"
                | "-nextexecutiontime"
                | "+nextexecutiontime"
            )[];
            status?: ("INVALID_RECIPIENT" | "INVALID_OWNER" | "DISABLED" | "VALID")[];
        }

        an object with query parameters

        • OptionalappID?: string

          The app ID you would like to filter by

        • OptionalconditionId?: string

          The conditionId you would like to filter by

        • Optionallimit?: number

          Limit the returned result set

        • Optionalnext?: string

          The cursor to the next page of data. Only one of next or previous may be specified.

        • Optionaloffset?: number

          Offset for finding a list of entities - used for pagination

        • OptionalownerId?: string

          The id of the owner you would like to filter by

        • OptionalownerName?: string

          The name of the owner you would like to filter by

        • Optionalprev?: string

          The cursor to the previous page of data. Only one of next or previous may be specified.

        • Optionalrole?: ("owner" | "recipient" | "notowner")[]

          The role you would like to filter by

        • Optionalsort?: (
              | "status"
              | "name"
              | "+status"
              | "-status"
              | "-name"
              | "+name"
              | "enabled"
              | "-datecreated"
              | "datecreated"
              | "+datecreated"
              | "-ownername"
              | "ownername"
              | "+ownername"
              | "lasttrigger"
              | "-lasttrigger"
              | "+lasttrigger"
              | "lastscan"
              | "-lastscan"
              | "+lastscan"
              | "-enabled"
              | "+enabled"
              | "nextexecutiontime"
              | "-nextexecutiontime"
              | "+nextexecutiontime"
          )[]

          Sort the returned result set by the specified field

        • Optionalstatus?: ("INVALID_RECIPIENT" | "INVALID_OWNER" | "DISABLED" | "VALID")[]

          The status you would like to filter by

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetDataAlertsHttpResponse>

      GetDataAlertsHttpError

an object with query parameters

GetDataAlertsHttpError

getDataAlertsSettings: (
    options?: ApiCallOptions,
) => Promise<GetDataAlertsSettingsHttpResponse>

Retrieves the current settings for data alerts.

Type declaration

GetDataAlertsSettingsHttpError

patchDataAlert: (
    alertId: string,
    body: AlertingTaskPatchRequestCompliantList,
    options?: ApiCallOptions,
) => Promise<PatchDataAlertHttpResponse>

Updates one or more properties of a specific data alerting task.

Type declaration

The alerting task identifier.

an object with the body content

PatchDataAlertHttpError

setDataAlertsSettings: (
    body: AlertingSettingsUpload,
    options?: ApiCallOptions,
) => Promise<SetDataAlertsSettingsHttpResponse>

Updates the settings for data alerts. User must be assigned the TenantAdmin role.

Type declaration

an object with the body content

SetDataAlertsSettingsHttpError

triggerDataAlerts: (
    body: AlertingActionsTriggerCreateRequest,
    options?: ApiCallOptions,
) => Promise<TriggerDataAlertsHttpResponse>

Creates a new data alerting task trigger action.

Type declaration

an object with the body content

TriggerDataAlertsHttpError

validateDataAlerts: (
    body: AlertingTaskCreateRequest,
    options?: ApiCallOptions,
) => Promise<ValidateDataAlertsHttpResponse>

Validates a new data alerting task. Current support includes validation for recipients only.

Type declaration

an object with the body content

ValidateDataAlertsHttpError