Ресурс

Subscriber Notification Template

Links subscriber notification templates to specific status pages. This allows you to use different notification templates for different status pages.

Модель Subscriber Notification Template

Свойства

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

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

    Status Page this template is linked to

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

    ID of the Status Page this template is linked to

  • Имя
    statusPageSubscriberNotificationTemplate
    Тип
    Subscriber Notification Template
    Описание

    The notification template to use for this status page

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

    ID of the notification template linked to this status page

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

GETorPOST/api/status-page-subscriber-notification-template-status-page/get-list

Список

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

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

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

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

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

POST
/api/status-page-subscriber-notification-template-status-page/get-list?skip=0&limit=10
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "projectId": true,
    "statusPageId": true,
    "statusPageSubscriberNotificationTemplateId": true,
    "_id": true,
    "createdAt": true
  },
  "query": {},
  "sort": {
    "createdAt": -1
  }
}

Ответ

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "377dedc0-28fe-11f1-b591-3fdcef396aba",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "statusPageId": "550e8400-e29b-41d4-a716-446655440000",
      "statusPageSubscriberNotificationTemplateId": "550e8400-e29b-41d4-a716-446655440000",
      "createdAt": "2024-01-15T10:30:00.000Z"
    },
    {
      "_id": "377dedc1-28fe-11f1-b591-3fdcef396aba",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "statusPageId": "550e8400-e29b-41d4-a716-446655440000",
      "statusPageSubscriberNotificationTemplateId": "550e8400-e29b-41d4-a716-446655440000",
      "createdAt": "2024-01-15T10:30:00.000Z"
    },
    {
      "_id": "377dedc2-28fe-11f1-b591-3fdcef396aba",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "statusPageId": "550e8400-e29b-41d4-a716-446655440000",
      "statusPageSubscriberNotificationTemplateId": "550e8400-e29b-41d4-a716-446655440000",
      "createdAt": "2024-01-15T10:30:00.000Z"
    }
  ]
}
GETorPOST/api/status-page-subscriber-notification-template-status-page/:id/get-item

Получить по ID

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

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

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

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

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

POST
/api/status-page-subscriber-notification-template-status-page/:id/get-item
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "projectId": true,
    "statusPageId": true,
    "statusPageSubscriberNotificationTemplateId": true,
    "_id": true,
    "createdAt": true
  }
}

Ответ

{
  "_id": "550e8400-e29b-41d4-a716-446655440000",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "statusPageId": "550e8400-e29b-41d4-a716-446655440000",
  "statusPageSubscriberNotificationTemplateId": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-15T10:30:00.000Z"
}
POST/api/status-page-subscriber-notification-template-status-page/count

Количество

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

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

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

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

Ответ

{
  "count": 107
}
POST/api/status-page-subscriber-notification-template-status-page

Создать Subscriber Notification Template

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

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

POST
/api/status-page-subscriber-notification-template-status-page
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "projectId": "550e8400-e29b-41d4-a716-446655440000",
    "statusPageId": "550e8400-e29b-41d4-a716-446655440000",
    "statusPageSubscriberNotificationTemplateId": "550e8400-e29b-41d4-a716-446655440000",
    "createdByUserId": "550e8400-e29b-41d4-a716-446655440000",
    "project": "Example project"
  }
}

Ответ

{
  "_id": "550e8400-e29b-41d4-a716-446655440000",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "statusPageId": "550e8400-e29b-41d4-a716-446655440000",
  "statusPageSubscriberNotificationTemplateId": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-15T10:30:00.000Z"
}
PUT/api/status-page-subscriber-notification-template-status-page/:id

Обновить по ID

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

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

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

POST/api/status-page-subscriber-notification-template-status-page/:id/update-item
GET/api/status-page-subscriber-notification-template-status-page/:id/update-item

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

PUT
/api/status-page-subscriber-notification-template-status-page/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "statusPageSubscriberNotificationTemplateId": "550e8400-e29b-41d4-a716-446655440000",
    "statusPageSubscriberNotificationTemplate": "Example notification template"
  }
}

Ответ

{}
DELETE/api/status-page-subscriber-notification-template-status-page/:id

Удалить по ID

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

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

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

POST/api/status-page-subscriber-notification-template-status-page/:id/delete-item
GET/api/status-page-subscriber-notification-template-status-page/:id/delete-item

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

DELETE
/api/status-page-subscriber-notification-template-status-page/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY

Ответ

{}

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

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

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

Нужны для чтения Subscriber Notification Template

  • Project Owner
  • Project Admin
  • Project Member
  • Read Status Page Subscriber Notification Template Link
  • Read All Project Resources

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

Нужны для создания Subscriber Notification Template

  • Project Owner
  • Project Admin
  • Project Member
  • Create Status Page Subscriber Notification Template Link

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

Нужны для обновления Subscriber Notification Template

  • Project Owner
  • Project Admin
  • Project Member
  • Edit Status Page Subscriber Notification Template Link

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

Нужны для удаления Subscriber Notification Template

  • Project Owner
  • Project Admin
  • Project Member
  • Delete Status Page Subscriber Notification Template Link