alerting tasks

Create data alert task

Creates a new data alerting task.

post/api/v1/data-alerts

Request body

namestring required

name associated to alerting task

appIdstring required

appId associated to this alert definition

enabledboolean

if the alerting task is enabled

sheetIdstring

sheetId associated to this alert definition

bookmarkIdstring

bookmarkId associated to this alert definition

conditionIdstring required

the id of the condition that determines if this data alert should be triggered

descriptionstring

description associated to alerting task

triggerType'RELOAD' | 'SCHEDULED' required

Type of job that triggered the task

Example request

{
  "recipients": {
    "userIds": [
      {
        "value": "1b263bs8m0mm_s21s3f",
        "groups": [
          "addedIndividually",
          "group1",
          "group2"
        ],
        "enabled": true,
        "subscribed": true,
        "taskRecipientErrors": [
          {
            "timestamp": "2019-10-15T16:07:01.492Z"
          }
        ],
        "alertingTaskRecipientErrors": [
          {
            "added": "2019-10-15T16:07:01.492Z"
          }
        ]
      }
    ],
    "groupIds": [
      {
        "value": "group1",
        "enabled": true,
        "taskGroupRecipientErrors": [
          {
            "timestamp": "2019-10-15T16:07:01.492Z"
          }
        ],
        "alertingTaskGroupRecipientErrors": [
          {
            "added": "2019-10-15T16:07:01.492Z"
          }
        ]
      }
    ]
  },
  "scheduleOptions": {
    "timezone": "Canada/Pacific",
    "recurrence": [
      "RRULE:FREQ=HOURLY;INTERVAL=2"
    ],
    "endDateTime": "2026-01-02T16:04:05",
    "startDateTime": "2006-01-02T16:04:05",
    "lastExecutionTime": "2020-11-20T12:00:55.000Z",
    "nextExecutionTime": "2020-11-20T12:00:55.000Z"
  }
}

Response

Alert creation has been accepted. The alerting task will have status creating, until status is set to either valid or invalid.

idstring

data alerting identifier (this is the alertID)

namestring

name associated to alerting task

appIdstring

appId associated to this alert definition

status'creating' | 'deleting'

particular status of the alerting task

enabledboolean

true if the alerting task is enabled

ownerIdstring

the owner of this alert

sheetIdstring

sheetId associated to this alert definition

lastScanstring

last time a trigger was detected, but not sure if executed for requesting user

tenantIdstring

the tenant of this alert

ownerNamestring

the owner name of this alert

accessMode'SOURCE_ACCESS' | 'TARGET_ACCESS'
bookmarkIdstring

bookmarkId associated to this alert definition

conditionIdstring

the id of the condition that determines if this data alert should be triggered

dateCreatedstring

Timestamp for the creation of the task (rfc3339 format)

descriptionstring

description associated to alerting task

errorStatus'OK' | 'FATAL-ERROR' | 'PARTIAL-TRIGGER'

error labels from the latest workflow that happened within the task

lastTriggerstring

last time an execution had been created for requesting user

lastUpdatedstring

Timestamp of the most recent update.

triggerType'RELOAD' | 'SCHEDULED' | 'MANUAL'

Type of job that triggered the task

hideSelectionsboolean

Whether the selection needs to be hidden.

evaluationCountinteger

the number of actual evaluations with engine this task has consumed in the current month

subscriptionIdsstring[]

list of subscriptions related to this alerting task

absoluteLastScanstring

last time a trigger was detected, but not sure if executed

conditionResponseobject

Should reference ConditionResponse type in condition-manager api docs

absoluteLastTriggerstring

last time an execution had been created

hasHistoryConditionboolean

true if the alert has history condition enabled

lastExecutionStatus'OK' | 'FAILED'
lastEvaluationCountUpdatestring

the date when the evaluation count was updated

Example response

{
  "id": "5da5825325dc9a0dd0260af9",
  "links": {
    "self": {
      "href": "http://localhost:8787/v1/items/5da5825325dc9a0dd0260af9"
    }
  },
  "recipients": {
    "userIds": [
      {
        "value": "1b263bs8m0mm_s21s3f",
        "groups": [
          "addedIndividually",
          "group1",
          "group2"
        ],
        "enabled": true,
        "subscribed": true,
        "taskRecipientErrors": [
          {
            "timestamp": "2019-10-15T16:07:01.492Z"
          }
        ],
        "alertingTaskRecipientErrors": [
          {
            "added": "2019-10-15T16:07:01.492Z"
          }
        ]
      }
    ],
    "groupIds": [
      {
        "value": "group1",
        "enabled": true,
        "taskGroupRecipientErrors": [
          {
            "timestamp": "2019-10-15T16:07:01.492Z"
          }
        ],
        "alertingTaskGroupRecipientErrors": [
          {
            "added": "2019-10-15T16:07:01.492Z"
          }
        ]
      }
    ]
  },
  "dateCreated": "2019-10-15T16:07:01.492Z",
  "lastUpdated": "2019-10-15T16:07:01.492Z",
  "scheduleOptions": {
    "timezone": "Canada/Pacific",
    "recurrence": [
      "RRULE:FREQ=HOURLY;INTERVAL=2"
    ],
    "endDateTime": "2026-01-02T16:04:05",
    "startDateTime": "2006-01-02T16:04:05",
    "lastExecutionTime": "2020-11-20T12:00:55.000Z",
    "nextExecutionTime": "2020-11-20T12:00:55.000Z"
  },
  "alertingTaskErrors": [
    {
      "added": "2019-10-15T16:07:01.492Z"
    }
  ],
  "recipientsChangeHistory": [
    {
      "patchAction": [
        {
          "op": "add",
          "value": {
            "value": "recipient-1",
            "enabled": true
          },
          "recipientType": "userid"
        },
        {
          "op": "remove",
          "value": "I6mWVd60wRWIbOXZr1ZKV8QTnxhnitb",
          "recipientType": "userid"
        },
        {
          "op": "enable",
          "value": "I6mWVd60wRWIbOXZr1ZKV8QTnxhnitb",
          "recipientType": "userid"
        },
        {
          "op": "disable",
          "value": "I6mWVd60wRWIbOXZr1ZKV8QTnxhnitb",
          "recipientType": "userid"
        },
        {
          "op": "replace",
          "value": [
            {
              "value": "recipient-1",
              "enabled": true
            },
            {
              "value": "recipient-2",
              "enabled": false
            }
          ],
          "recipientType": "userid"
        }
      ]
    }
  ]
}

Changes