Monitor Feed
Log of the entire monitor state change. This is a log of all the monitor state changes, public notes, more etc.
Модель Monitor 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
- Имя
monitor- Тип
- Monitor
- Описание
Relation to Monitor in which this resource belongs
- Имя
monitorId- Тип
- Object IDОбязательно
- Описание
Relation to Monitor 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 monitor state change in Markdown
- Имя
moreInformationInMarkdown- Тип
- Markdown
- Описание
More information in Markdown
- Имя
monitorFeedEventType- Тип
- TextОбязательно
- Описание
Monitor Feed Event
- Имя
displayColor- Тип
- ColorОбязательно
- Описание
Display color for the monitor 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/monitor-feed/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Monitor Feed». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Monitor Feed, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/monitor-feed/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"displayColor": true,
"feedInfoInMarkdown": true,
"monitorFeedEventType": true,
"monitorId": true,
"projectId": true
},
"query": {
"monitorFeedEventType": "MonitorStatusChanged"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "37749ef0-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#3498db",
"feedInfoInMarkdown": "**Monitor Status Changed**: Status changed from `Operational` to `Degraded` - Response time exceeded threshold",
"monitorFeedEventType": "MonitorStatusChanged",
"monitorId": "e5f6a7b8-d9c0-1234-5678-901234efab56",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
},
{
"_id": "37749ef1-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#3498db",
"feedInfoInMarkdown": "**Monitor Status Changed**: Status changed from `Operational` to `Degraded` - Response time exceeded threshold",
"monitorFeedEventType": "MonitorStatusChanged",
"monitorId": "e5f6a7b8-d9c0-1234-5678-901234efab56",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
},
{
"_id": "37749ef2-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#3498db",
"feedInfoInMarkdown": "**Monitor Status Changed**: Status changed from `Operational` to `Degraded` - Response time exceeded threshold",
"monitorFeedEventType": "MonitorStatusChanged",
"monitorId": "e5f6a7b8-d9c0-1234-5678-901234efab56",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}
]
}/api/monitor-feed/:id/get-itemПолучить по ID
Возвращает объект «Monitor Feed» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/monitor-feed/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"displayColor": true,
"feedInfoInMarkdown": true,
"monitorFeedEventType": true,
"monitorId": true,
"projectId": true
}
}Ответ
{
"_id": "37749ef0-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#3498db",
"feedInfoInMarkdown": "**Monitor Status Changed**: Status changed from `Operational` to `Degraded` - Response time exceeded threshold",
"monitorFeedEventType": "MonitorStatusChanged",
"monitorId": "e5f6a7b8-d9c0-1234-5678-901234efab56",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}/api/monitor-feed/countКоличество
Возвращает количество ваших объектов «Monitor Feed».
Необязательное тело запроса
query- Чтобы фильтровать Monitor Feed, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/monitor-feed/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"monitorFeedEventType": "MonitorStatusChanged"
}
}Ответ
{
"count": 107
}/api/monitor-feedСоздать Monitor Feed
Создаёт новый объект.
Запрос создания
POST/api/monitor-feedContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"displayColor": "#3498db",
"feedInfoInMarkdown": "**Monitor Status Changed**: Status changed from `Operational` to `Degraded` - Response time exceeded threshold",
"monitorFeedEventType": "MonitorStatusChanged",
"monitorId": "e5f6a7b8-d9c0-1234-5678-901234efab56",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}
}Ответ
{
"_id": "37749ef0-28fe-11f1-b591-3fdcef396aba",
"displayColor": "#3498db",
"feedInfoInMarkdown": "**Monitor Status Changed**: Status changed from `Operational` to `Degraded` - Response time exceeded threshold",
"monitorFeedEventType": "MonitorStatusChanged",
"monitorId": "e5f6a7b8-d9c0-1234-5678-901234efab56",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e"
}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Monitor Feed
Project OwnerProject AdminProject MemberRead Monitor FeedRead All Project Resources
Права на создание
Нужны для создания Monitor Feed
Project OwnerProject AdminProject MemberCreate Monitor Feed
Права на обновление
Нужны для обновления Monitor Feed
Права на удаление
Нужны для удаления Monitor Feed