Ресурс

Alert Internal Note

Manage internal notes for your alert

Модель Alert Internal Note

Свойства

  • Имя
    _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

  • Имя
    alert
    Тип
    Alert
    Описание

    Relation to Alert in which this resource belongs

  • Имя
    alertId
    Тип
    Object IDОбязательно
    Описание

    Relation to Alert 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)

  • Имя
    note
    Тип
    Markdown
    Описание

    Notes in markdown

  • Имя
    attachments
    Тип
    File
    Описание

    Files attached to this note

  • Имя
    postedFromSlackMessageId
    Тип
    Long Text
    Описание

    Unique identifier for the Slack message this note was created from (channel_id:message_ts). Used to prevent duplicate notes when multiple users react to the same message.

GETorPOST/api/alert-internal-note/get-list

Список

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

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

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

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

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

POST
/api/alert-internal-note/get-list?skip=0&limit=10
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "alertId": true,
    "projectId": true,
    "createdByUserId": true,
    "note": true,
    "postedFromSlackMessageId": true
  },
  "query": {
    "postedFromSlackMessageId": "C1234567890:1234567890.123456"
  },
  "sort": {
    "createdAt": -1
  }
}

Ответ

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "376c88a0-28fe-11f1-b591-3fdcef396aba",
      "alertId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "createdByUserId": "7c8d9e0f-a1b2-3c4d-9e5f-8a9b0c1d2e3f",
      "note": "## Alert Investigation\n\nChecked the server logs and found high CPU usage on web-server-03. The process `node-worker-12` was consuming 95% CPU.\n\n**Resolution:**\n- Restarted the worker process\n- Alert cleared automatically after 2 minutes\n- Will monitor for recurrence and investigate if this happens again",
      "postedFromSlackMessageId": "C1234567890:1234567890.123456"
    },
    {
      "_id": "376c88a1-28fe-11f1-b591-3fdcef396aba",
      "alertId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "createdByUserId": "7c8d9e0f-a1b2-3c4d-9e5f-8a9b0c1d2e3f",
      "note": "## Alert Investigation\n\nChecked the server logs and found high CPU usage on web-server-03. The process `node-worker-12` was consuming 95% CPU.\n\n**Resolution:**\n- Restarted the worker process\n- Alert cleared automatically after 2 minutes\n- Will monitor for recurrence and investigate if this happens again",
      "postedFromSlackMessageId": "C1234567890:1234567890.123456"
    },
    {
      "_id": "376c88a2-28fe-11f1-b591-3fdcef396aba",
      "alertId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "createdByUserId": "7c8d9e0f-a1b2-3c4d-9e5f-8a9b0c1d2e3f",
      "note": "## Alert Investigation\n\nChecked the server logs and found high CPU usage on web-server-03. The process `node-worker-12` was consuming 95% CPU.\n\n**Resolution:**\n- Restarted the worker process\n- Alert cleared automatically after 2 minutes\n- Will monitor for recurrence and investigate if this happens again",
      "postedFromSlackMessageId": "C1234567890:1234567890.123456"
    }
  ]
}
GETorPOST/api/alert-internal-note/:id/get-item

Получить по ID

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

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

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

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

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

POST
/api/alert-internal-note/:id/get-item
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "alertId": true,
    "projectId": true,
    "createdByUserId": true,
    "note": true,
    "postedFromSlackMessageId": true
  }
}

Ответ

{
  "_id": "376c88a0-28fe-11f1-b591-3fdcef396aba",
  "alertId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "createdByUserId": "7c8d9e0f-a1b2-3c4d-9e5f-8a9b0c1d2e3f",
  "note": "## Alert Investigation\n\nChecked the server logs and found high CPU usage on web-server-03. The process `node-worker-12` was consuming 95% CPU.\n\n**Resolution:**\n- Restarted the worker process\n- Alert cleared automatically after 2 minutes\n- Will monitor for recurrence and investigate if this happens again",
  "postedFromSlackMessageId": "C1234567890:1234567890.123456"
}
POST/api/alert-internal-note/count

Количество

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

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

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

POST
/api/alert-internal-note/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {
    "postedFromSlackMessageId": "C1234567890:1234567890.123456"
  }
}

Ответ

{
  "count": 107
}
POST/api/alert-internal-note

Создать Alert Internal Note

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

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

POST
/api/alert-internal-note
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "alertId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
    "createdByUserId": "7c8d9e0f-a1b2-3c4d-9e5f-8a9b0c1d2e3f",
    "note": "## Alert Investigation\n\nChecked the server logs and found high CPU usage on web-server-03. The process `node-worker-12` was consuming 95% CPU.\n\n**Resolution:**\n- Restarted the worker process\n- Alert cleared automatically after 2 minutes\n- Will monitor for recurrence and investigate if this happens again",
    "postedFromSlackMessageId": "C1234567890:1234567890.123456"
  }
}

Ответ

{
  "_id": "376c88a0-28fe-11f1-b591-3fdcef396aba",
  "alertId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "createdByUserId": "7c8d9e0f-a1b2-3c4d-9e5f-8a9b0c1d2e3f",
  "note": "## Alert Investigation\n\nChecked the server logs and found high CPU usage on web-server-03. The process `node-worker-12` was consuming 95% CPU.\n\n**Resolution:**\n- Restarted the worker process\n- Alert cleared automatically after 2 minutes\n- Will monitor for recurrence and investigate if this happens again",
  "postedFromSlackMessageId": "C1234567890:1234567890.123456"
}
PUT/api/alert-internal-note/:id

Обновить по ID

Обновляет объект по ID.

Альтернативные методы

Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:

POST/api/alert-internal-note/:id/update-item
GET/api/alert-internal-note/:id/update-item

Запрос обновления

PUT
/api/alert-internal-note/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "note": "## Alert Investigation\n\nChecked the server logs and found high CPU usage on web-server-03. The process `node-worker-12` was consuming 95% CPU.\n\n**Resolution:**\n- Restarted the worker process\n- Alert cleared automatically after 2 minutes\n- Will monitor for recurrence and investigate if this happens again",
    "attachments": []
  }
}

Ответ

{}
DELETE/api/alert-internal-note/:id

Удалить по ID

Удаляет объект по ID.

Альтернативные методы

Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:

POST/api/alert-internal-note/:id/delete-item
GET/api/alert-internal-note/:id/delete-item

Запрос удаления

DELETE
/api/alert-internal-note/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY

Ответ

{}

Права доступа

Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.

Права на чтение

Нужны для чтения Alert Internal Note

  • Project Owner
  • Project Admin
  • Project Member
  • Read Alert Internal Note
  • Read All Project Resources

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

Нужны для создания Alert Internal Note

  • Project Owner
  • Project Admin
  • Project Member
  • Create Alert Internal Note

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

Нужны для обновления Alert Internal Note

  • Project Owner
  • Project Admin
  • Project Member
  • Edit Alert Internal Note

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

Нужны для удаления Alert Internal Note

  • Project Owner
  • Project Admin
  • Project Member
  • Delete Alert Internal Note