Ресурс

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

GETorPOST/api/incident-feed/get-list

Список

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

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

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

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

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

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

Получить по ID

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

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

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

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

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

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

Количество

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

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

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

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

Ответ

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

Создать Incident Feed

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

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

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

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

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

  • Project Owner
  • Project Admin
  • Project Member
  • Create Incident Feed

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

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

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

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

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

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