Ресурс

Email Log

Logs of all the Email sent out to all users and subscribers for this project.

Модель Email Log

Свойства

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

  • Имя
    toEmail
    Тип
    Email
    Описание

    Email address where the mail was sent

  • Имя
    fromEmail
    Тип
    Email
    Описание

    Email address where the mail was sent from

  • Имя
    subject
    Тип
    Long TextОбязательно
    Описание

    Subject of the email sent

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

    Status Message (if any)

  • Имя
    status
    Тип
    TextОбязательно
    Описание

    Status of the SMS sent

  • Имя
    projectSmtpConfig
    Тип
    Entity
    Описание

    Relation to ProjectSmtpConfig resource in which this object belongs

  • Имя
    projectSmtpConfigId
    Тип
    Object ID
    Описание

    ID of your Project Smtp Config in which this object belongs

  • Имя
    incident
    Тип
    Incident
    Описание

    Incident associated with this email (if any)

  • Имя
    incidentId
    Тип
    Object ID
    Описание

    ID of Incident associated with this email (if any)

  • Имя
    user
    Тип
    User
    Описание

    User who initiated this email (if any)

  • Имя
    userId
    Тип
    Object ID
    Описание

    ID of User who initiated this email (if any)

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

    Alert associated with this email (if any)

  • Имя
    alertId
    Тип
    Object ID
    Описание

    ID of Alert associated with this email (if any)

  • Имя
    monitor
    Тип
    Monitor
    Описание

    Monitor associated with this email (if any)

  • Имя
    monitorId
    Тип
    Object ID
    Описание

    ID of Monitor associated with this email (if any)

  • Имя
    scheduledMaintenance
    Тип
    Scheduled Maintenance Event
    Описание

    Scheduled Maintenance associated with this email (if any)

  • Имя
    scheduledMaintenanceId
    Тип
    Object ID
    Описание

    ID of Scheduled Maintenance associated with this email (if any)

  • Имя
    statusPage
    Тип
    Status Page
    Описание

    Status Page associated with this email (if any)

  • Имя
    statusPageId
    Тип
    Object ID
    Описание

    ID of Status Page associated with this email (if any)

  • Имя
    statusPageAnnouncement
    Тип
    Status Page Announcement
    Описание

    Status Page Announcement associated with this email (if any)

  • Имя
    statusPageAnnouncementId
    Тип
    Object ID
    Описание

    ID of Status Page Announcement associated with this email (if any)

  • Имя
    onCallDutyPolicy
    Тип
    On-Call Policy
    Описание

    On-Call Duty Policy associated with this email (if any)

  • Имя
    onCallDutyPolicyId
    Тип
    Object ID
    Описание

    ID of On-Call Duty Policy associated with this email (if any)

  • Имя
    onCallDutyPolicyEscalationRule
    Тип
    Escalation Rule
    Описание

    On-Call Duty Policy Escalation Rule associated with this email (if any)

  • Имя
    onCallDutyPolicyEscalationRuleId
    Тип
    Object ID
    Описание

    ID of On-Call Duty Policy Escalation Rule associated with this email (if any)

  • Имя
    onCallDutyPolicySchedule
    Тип
    On-Call Policy Schedule
    Описание

    On-Call Duty Policy Schedule associated with this email (if any)

  • Имя
    onCallDutyPolicyScheduleId
    Тип
    Object ID
    Описание

    ID of On-Call Duty Policy Schedule associated with this email (if any)

  • Имя
    team
    Тип
    Team
    Описание

    Team associated with this email (if any)

  • Имя
    teamId
    Тип
    Object ID
    Описание

    ID of Team associated with this email (if any)

GETorPOST/api/email-log/get-list

Список

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

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

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

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

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

POST
/api/email-log/get-list?skip=0&limit=10
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "projectId": true,
    "status": true,
    "subject": true,
    "alert": true,
    "alertId": true
  },
  "query": {
    "status": "Sent"
  },
  "sort": {
    "createdAt": -1
  }
}

Ответ

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "376e0f40-28fe-11f1-b591-3fdcef396aba",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "status": "Sent",
      "subject": "Alert: High CPU Usage Detected on Server",
      "alert": "d4e5f6a7-89ab-23de-f456-456789abcdef",
      "alertId": "d4e5f6a7-89ab-23de-f456-456789abcdef"
    },
    {
      "_id": "376e0f41-28fe-11f1-b591-3fdcef396aba",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "status": "Sent",
      "subject": "Alert: High CPU Usage Detected on Server",
      "alert": "d4e5f6a7-89ab-23de-f456-456789abcdef",
      "alertId": "d4e5f6a7-89ab-23de-f456-456789abcdef"
    },
    {
      "_id": "376e0f42-28fe-11f1-b591-3fdcef396aba",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "status": "Sent",
      "subject": "Alert: High CPU Usage Detected on Server",
      "alert": "d4e5f6a7-89ab-23de-f456-456789abcdef",
      "alertId": "d4e5f6a7-89ab-23de-f456-456789abcdef"
    }
  ]
}
GETorPOST/api/email-log/:id/get-item

Получить по ID

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

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

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

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

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

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

Ответ

{
  "_id": "376e0f40-28fe-11f1-b591-3fdcef396aba",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "status": "Sent",
  "subject": "Alert: High CPU Usage Detected on Server",
  "alert": "d4e5f6a7-89ab-23de-f456-456789abcdef",
  "alertId": "d4e5f6a7-89ab-23de-f456-456789abcdef"
}
POST/api/email-log/count

Количество

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

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

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

POST
/api/email-log/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {
    "status": "Sent"
  }
}

Ответ

{
  "count": 107
}

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

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

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

Нужны для чтения Email Log

  • Project Owner
  • Project Admin
  • Project Member
  • Read Email Log
  • Read All Project Resources

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

Нужны для создания Email Log

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

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

Нужны для обновления Email Log

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

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

Нужны для удаления Email Log

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