Incident Feed
Log of the entire incident state change. This is a log of all the incident state changes, public notes, more etc.
Модель Incident Feed
Свойства
- Имя
_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
- Имя
incident- Тип
- Incident
- Описание
Relation to Incident in which this resource belongs
- Имя
incidentId- Тип
- Object IDОбязательно
- Описание
Relation to Incident ID in which this resource belongs
- Имя
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)
- Имя
feedInfoInMarkdown- Тип
- MarkdownОбязательно
- Описание
Log of the entire incident state change in Markdown
- Имя
moreInformationInMarkdown- Тип
- Markdown
- Описание
More information in Markdown
- Имя
incidentFeedEventType- Тип
- TextОбязательно
- Описание
Incident Feed Event
- Имя
displayColor- Тип
- ColorОбязательно
- Описание
Display color for the incident log
- Имя
user- Тип
- User
- Описание
Relation to User who this feed belongs to (if this feed belongs to a User)
- Имя
userId- Тип
- Object ID
- Описание
User who this feed belongs to (if this feed belongs to a User)
- Имя
postedAt- Тип
- Date
- Описание
Date and time when the feed was posted
/api/incident-feed/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Incident Feed». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Incident Feed, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/incident-feed/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"displayColor": true,
"feedInfoInMarkdown": true,
"incidentFeedEventType": true,
"incidentId": true,
"projectId": true
},
"query": {
"incidentFeedEventType": "IncidentStateChanged"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "3770a750-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#e74c3c",
"feedInfoInMarkdown": "**Incident State Changed**: Status changed from `Acknowledged` to `Resolved` by John Doe",
"incidentFeedEventType": "IncidentStateChanged",
"incidentId": "a1b2c3d4-f5e6-7890-1234-567890abcdef",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
},
{
"_id": "3770a751-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#e74c3c",
"feedInfoInMarkdown": "**Incident State Changed**: Status changed from `Acknowledged` to `Resolved` by John Doe",
"incidentFeedEventType": "IncidentStateChanged",
"incidentId": "a1b2c3d4-f5e6-7890-1234-567890abcdef",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
},
{
"_id": "3770a752-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#e74c3c",
"feedInfoInMarkdown": "**Incident State Changed**: Status changed from `Acknowledged` to `Resolved` by John Doe",
"incidentFeedEventType": "IncidentStateChanged",
"incidentId": "a1b2c3d4-f5e6-7890-1234-567890abcdef",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}
]
}/api/incident-feed/:id/get-itemПолучить по ID
Возвращает объект «Incident Feed» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/incident-feed/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"displayColor": true,
"feedInfoInMarkdown": true,
"incidentFeedEventType": true,
"incidentId": true,
"projectId": true
}
}Ответ
{
"_id": "3770a750-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#e74c3c",
"feedInfoInMarkdown": "**Incident State Changed**: Status changed from `Acknowledged` to `Resolved` by John Doe",
"incidentFeedEventType": "IncidentStateChanged",
"incidentId": "a1b2c3d4-f5e6-7890-1234-567890abcdef",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}/api/incident-feed/countКоличество
Возвращает количество ваших объектов «Incident Feed».
Необязательное тело запроса
query- Чтобы фильтровать Incident Feed, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/incident-feed/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"incidentFeedEventType": "IncidentStateChanged"
}
}Ответ
{
"count": 107
}/api/incident-feedСоздать Incident Feed
Создаёт новый объект.
Запрос создания
POST/api/incident-feedContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"displayColor": "#e74c3c",
"feedInfoInMarkdown": "**Incident State Changed**: Status changed from `Acknowledged` to `Resolved` by John Doe",
"incidentFeedEventType": "IncidentStateChanged",
"incidentId": "a1b2c3d4-f5e6-7890-1234-567890abcdef",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}
}Ответ
{
"_id": "3770a750-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#e74c3c",
"feedInfoInMarkdown": "**Incident State Changed**: Status changed from `Acknowledged` to `Resolved` by John Doe",
"incidentFeedEventType": "IncidentStateChanged",
"incidentId": "a1b2c3d4-f5e6-7890-1234-567890abcdef",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Incident Feed
Project OwnerProject AdminProject MemberRead Incident FeedRead All Project Resources
Права на создание
Нужны для создания Incident Feed
Project OwnerProject AdminProject MemberCreate Incident Feed
Права на обновление
Нужны для обновления Incident Feed
Права на удаление
Нужны для удаления Incident Feed