Alert Episode
Manage alert episodes (groups of related alerts) for your project
Модель Alert Episode
Свойства
- Имя
_id- Тип
- Object ID
- Описание
ID of this object
- Имя
createdAt- Тип
- Date
- Описание
Date and Time when the object was created.
- Имя
updatedAt- Тип
- Date
- Описание
Date and Time when the object was updated.
- Имя
project- Тип
- Project
- Описание
Relation to Project Resource in which this object belongs
- Имя
projectId- Тип
- Object IDОбязательно
- Описание
ID of your Project in which this object belongs
- Имя
title- Тип
- Long TextОбязательно
- Описание
Title of this alert episode
- Имя
description- Тип
- Markdown
- Описание
Description of this alert episode. This is in markdown format.
- Имя
episodeNumber- Тип
- Number
- Описание
Auto-incrementing episode number per project
- Имя
episodeNumberWithPrefix- Тип
- Text
- Описание
Episode number with prefix (e.g., 'AE-42' or '#42')
- Имя
currentAlertState- Тип
- Alert State
- Описание
Current state of this episode. Is the episode acknowledged? or resolved?
- Имя
currentAlertStateId- Тип
- Object IDОбязательно
- Описание
Current Alert State ID
- Имя
alertSeverity- Тип
- Alert Severity
- Описание
High-water mark severity of this episode. Represents the highest severity among all member alerts.
- Имя
alertSeverityId- Тип
- Object ID
- Описание
Alert Severity ID
- Имя
rootCause- Тип
- Markdown
- Описание
User-documented root cause of this episode
- Имя
lastAlertAddedAt- Тип
- Date
- Описание
When the last alert was added to this episode
- Имя
resolvedAt- Тип
- Date
- Описание
When this episode was resolved
- Имя
allAlertsResolvedAt- Тип
- Date
- Описание
When all alerts in this episode were first detected as resolved. Used for resolve delay calculation.
- Имя
assignedToUser- Тип
- User
- Описание
User who is assigned to this episode
- Имя
assignedToUserId- Тип
- Object ID
- Описание
User ID who is assigned to this episode
- Имя
assignedToTeam- Тип
- Team
- Описание
Team that is assigned to this episode
- Имя
assignedToTeamId- Тип
- Object ID
- Описание
Team ID that is assigned to this episode
- Имя
alertGroupingRule- Тип
- Alert Grouping Rule
- Описание
The grouping rule that created this episode (null for manually created episodes)
- Имя
alertGroupingRuleId- Тип
- Object ID
- Описание
Alert Grouping Rule ID that created this episode
- Имя
onCallDutyPolicies- Тип
- On-Call Policy
- Описание
List of on-call duty policies to execute for this episode.
- Имя
isOnCallPolicyExecuted- Тип
- BooleanОбязательно
- Описание
Whether the on-call policy has been executed for this episode
- Имя
alertCount- Тип
- NumberОбязательно
- Описание
Denormalized count of alerts in this episode
- Имя
titleTemplate- Тип
- Long Text
- Описание
Template used to generate the episode title. Stored for dynamic variable updates.
- Имя
descriptionTemplate- Тип
- Long Text
- Описание
Template used to generate the episode description. Stored for dynamic variable updates.
- Имя
isManuallyCreated- Тип
- BooleanОбязательно
- Описание
Whether this episode was manually created vs auto-created by a rule
- Имя
labels- Тип
- Label
- Описание
Relation to Labels Array where this object is categorized in.
- Имя
createdByUser- Тип
- User
- Описание
Relation to User who created this object (if this object was created by a User)
- Имя
createdByUserId- Тип
- Object ID
- Описание
User ID who created this object (if this object was created by a User)
- Имя
isOwnerNotifiedOfEpisodeCreation- Тип
- BooleanОбязательно
- Описание
Are owners notified when this episode is created?
- Имя
groupingKey- Тип
- Long Text
- Описание
Key used for grouping alerts into this episode. Generated from groupByFields of the matching rule.
- Имя
remediationNotes- Тип
- Markdown
- Описание
User-documented remediation steps and notes for this episode
- Имя
postUpdatesToWorkspaceChannels- Тип
- JSON
- Описание
Workspace channels to post episode updates to (e.g., Slack, Microsoft Teams)
/api/alert-episode/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Alert Episode». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Alert Episode, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/alert-episode/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"alertCount": true,
"currentAlertStateId": true,
"isManuallyCreated": true,
"isOnCallPolicyExecuted": true,
"isOwnerNotifiedOfEpisodeCreation": true
},
"query": {
"title": "Example title"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "376b0200-28fe-11f1-b591-3fdcef396aba",
"alertCount": 100,
"currentAlertStateId": "550e8400-e29b-41d4-a716-446655440000",
"isManuallyCreated": true,
"isOnCallPolicyExecuted": true,
"isOwnerNotifiedOfEpisodeCreation": true
},
{
"_id": "376b0201-28fe-11f1-b591-3fdcef396aba",
"alertCount": 100,
"currentAlertStateId": "550e8400-e29b-41d4-a716-446655440000",
"isManuallyCreated": true,
"isOnCallPolicyExecuted": true,
"isOwnerNotifiedOfEpisodeCreation": true
},
{
"_id": "376b0202-28fe-11f1-b591-3fdcef396aba",
"alertCount": 100,
"currentAlertStateId": "550e8400-e29b-41d4-a716-446655440000",
"isManuallyCreated": true,
"isOnCallPolicyExecuted": true,
"isOwnerNotifiedOfEpisodeCreation": true
}
]
}/api/alert-episode/:id/get-itemПолучить по ID
Возвращает объект «Alert Episode» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/alert-episode/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"alertCount": true,
"currentAlertStateId": true,
"isManuallyCreated": true,
"isOnCallPolicyExecuted": true,
"isOwnerNotifiedOfEpisodeCreation": true
}
}Ответ
{
"_id": "376b0200-28fe-11f1-b591-3fdcef396aba",
"alertCount": 100,
"currentAlertStateId": "550e8400-e29b-41d4-a716-446655440000",
"isManuallyCreated": true,
"isOnCallPolicyExecuted": true,
"isOwnerNotifiedOfEpisodeCreation": true
}/api/alert-episode/countКоличество
Возвращает количество ваших объектов «Alert Episode».
Необязательное тело запроса
query- Чтобы фильтровать Alert Episode, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/alert-episode/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"title": "Example title"
}
}Ответ
{
"count": 107
}/api/alert-episodeСоздать Alert Episode
Создаёт новый объект.
Запрос создания
POST/api/alert-episodeContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"currentAlertStateId": "550e8400-e29b-41d4-a716-446655440000",
"isManuallyCreated": true,
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"title": "Example title",
"alertGroupingRule": "Example alert grouping rule"
}
}Ответ
{
"_id": "376b0200-28fe-11f1-b591-3fdcef396aba",
"alertCount": 100,
"currentAlertStateId": "550e8400-e29b-41d4-a716-446655440000",
"isManuallyCreated": true,
"isOnCallPolicyExecuted": true,
"isOwnerNotifiedOfEpisodeCreation": true
}/api/alert-episode/:idОбновить по ID
Обновляет объект по ID.
Альтернативные методы
Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:
Запрос обновления
PUT/api/alert-episode/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"currentAlertStateId": "550e8400-e29b-41d4-a716-446655440000",
"title": "Example title",
"alertGroupingRule": "Example alert grouping rule"
}
}Ответ
{}/api/alert-episode/:idУдалить по ID
Удаляет объект по ID.
Альтернативные методы
Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:
Запрос удаления
DELETE/api/alert-episode/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Ответ
{}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Alert Episode
Project OwnerProject AdminProject MemberRead Alert EpisodeRead All Project Resources
Права на создание
Нужны для создания Alert Episode
Project OwnerProject AdminProject MemberCreate Alert Episode
Права на обновление
Нужны для обновления Alert Episode
Project OwnerProject AdminProject MemberEdit Alert Episode
Права на удаление
Нужны для удаления Alert Episode
Project OwnerProject AdminProject MemberDelete Alert Episode