Ресурс

Push Notification Log

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

Модель Push Notification 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

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

    Title of the push notification

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

    Body of the push notification

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

    Type of device this was sent to (e.g., web)

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

    Name of the device this was sent to

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

    Status Message (if any)

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

    Status of the push notification

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

    Incident associated with this Push (if any)

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

    ID of Incident associated with this Push (if any)

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

    User who initiated this Push notification (if any)

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

    ID of User who initiated this Push notification (if any)

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

    Alert associated with this Push (if any)

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

    ID of Alert associated with this Push (if any)

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

    Monitor associated with this Push (if any)

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

    ID of Monitor associated with this Push (if any)

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

    Scheduled Maintenance associated with this Push (if any)

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

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

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

    Status Page associated with this Push (if any)

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

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

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

    Status Page Announcement associated with this Push (if any)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Team associated with this Push Notification (if any)

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

    ID of Team associated with this Push Notification (if any)

GETorPOST/api/push-notification-log/get-list

Список

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

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

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

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

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

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

Ответ

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

Получить по ID

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

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

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

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

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

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

Ответ

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

Количество

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

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

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

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

Ответ

{
  "count": 107
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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