Ресурс

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

GETorPOST/api/monitor-feed/get-list

Список

Этот метод возвращает постраничный список ваших объектов «Monitor Feed». По умолчанию на странице до десяти записей.

Необязательные query-параметры

  • limit
    число
    Сколько объектов вернуть. По умолчанию 10, максимум 100
  • skip
    число
    Сколько объектов пропустить (для пагинации)

Необязательное тело запроса

Запрос списка

POST
/api/monitor-feed/get-list?skip=0&limit=10
Заголовки
Content-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"
    }
  ]
}
GETorPOST/api/monitor-feed/:id/get-item

Получить по ID

Возвращает объект «Monitor Feed» по идентификатору.

  • id
    строка
    ID объекта

Необязательное тело запроса

  • select
    По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.

Запрос одного объекта

POST
/api/monitor-feed/:id/get-item
Заголовки
Content-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"
}
POST/api/monitor-feed/count

Количество

Возвращает количество ваших объектов «Monitor Feed».

Необязательное тело запроса

Запрос количества

POST
/api/monitor-feed/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {
    "monitorFeedEventType": "MonitorStatusChanged"
  }
}

Ответ

{
  "count": 107
}
POST/api/monitor-feed

Создать Monitor Feed

Создаёт новый объект.

Запрос создания

POST
/api/monitor-feed
Заголовки
Content-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 Owner
  • Project Admin
  • Project Member
  • Read Monitor Feed
  • Read All Project Resources

Права на создание

Нужны для создания Monitor Feed

  • Project Owner
  • Project Admin
  • Project Member
  • Create Monitor Feed

Права на обновление

Нужны для обновления Monitor Feed

Ресурс нельзя обновить через API

Права на удаление

Нужны для удаления Monitor Feed

Ресурс нельзя удалить через API