Ресурс

Scheduled Maintenance Template

Manage scheduled maintenance templates for your project

Модель Scheduled Maintenance 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

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

    Name of the Scheduled Maintenance Template

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

    Description of the Scheduled Maintenance Template

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

    Title of this scheduled event.

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

    Description of this scheduled event that will show up on Status Page. This is a markdown field.

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

    Friendly globally unique name for your object

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

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

    List of monitors attached to this event

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

    List of status pages to show this event on

  • Имя
    labels
    Тип
    Label
    Описание

    Relation to Labels Array where this object is categorized in.

  • Имя
    changeMonitorStatusTo
    Тип
    Scheduled Maintenance State
    Описание

    Relation to Monitor Status Object. All monitors connected to this event will be changed to this status when the event is ongoing.

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

    Relation to Monitor Status Object ID. All monitors connected to this incident will be changed to this status when the event is ongoing.

  • Имя
    firstEventScheduledAt
    Тип
    Date
    Описание

    When would you like to schedule the first event?

  • Имя
    firstEventStartsAt
    Тип
    Date
    Описание

    When does the first event start?

  • Имя
    firstEventEndsAt
    Тип
    Date
    Описание

    When does the first event end?

  • Имя
    recurringInterval
    Тип
    JSON
    Описание

    How often should this event recur?

  • Имя
    isRecurringEvent
    Тип
    Boolean
    Описание

    Is this a recurring event?

  • Имя
    scheduleNextEventAt
    Тип
    Date
    Описание

    When is the next event scheduled?

  • Имя
    shouldStatusPageSubscribersBeNotifiedOnEventCreated
    Тип
    Boolean
    Описание

    Should subscribers be notified about this event creation?

  • Имя
    shouldStatusPageSubscribersBeNotifiedWhenEventChangedToOngoing
    Тип
    Boolean
    Описание

    Should subscribers be notified about this event event is changed to ongoing?

  • Имя
    shouldStatusPageSubscribersBeNotifiedWhenEventChangedToEnded
    Тип
    Boolean
    Описание

    Should subscribers be notified about this event event is changed to ended?

  • Имя
    customFields
    Тип
    JSON
    Описание

    Custom Fields on this resource.

  • Имя
    sendSubscriberNotificationsOnBeforeTheEvent
    Тип
    JSON
    Описание

    Should subscribers be notified before the event?

GETorPOST/api/scheduled-maintenance-template/get-list

Список

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

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

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

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

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

POST
/api/scheduled-maintenance-template/get-list?skip=0&limit=10
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "projectId": true,
    "slug": true,
    "templateDescription": true,
    "templateName": true,
    "title": true
  },
  "query": {
    "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications."
  },
  "sort": {
    "createdAt": -1
  }
}

Ответ

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "377a1d30-28fe-11f1-b591-3fdcef396aba",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "slug": "database-upgrade-template",
      "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications.",
      "templateName": "Database Upgrade Template",
      "title": "Scheduled Database Maintenance - PostgreSQL Upgrade"
    },
    {
      "_id": "377a1d31-28fe-11f1-b591-3fdcef396aba",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "slug": "database-upgrade-template",
      "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications.",
      "templateName": "Database Upgrade Template",
      "title": "Scheduled Database Maintenance - PostgreSQL Upgrade"
    },
    {
      "_id": "377a1d32-28fe-11f1-b591-3fdcef396aba",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "slug": "database-upgrade-template",
      "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications.",
      "templateName": "Database Upgrade Template",
      "title": "Scheduled Database Maintenance - PostgreSQL Upgrade"
    }
  ]
}
GETorPOST/api/scheduled-maintenance-template/:id/get-item

Получить по ID

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

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

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

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

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

POST
/api/scheduled-maintenance-template/:id/get-item
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "projectId": true,
    "slug": true,
    "templateDescription": true,
    "templateName": true,
    "title": true
  }
}

Ответ

{
  "_id": "377a1d30-28fe-11f1-b591-3fdcef396aba",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "slug": "database-upgrade-template",
  "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications.",
  "templateName": "Database Upgrade Template",
  "title": "Scheduled Database Maintenance - PostgreSQL Upgrade"
}
POST/api/scheduled-maintenance-template/count

Количество

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

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

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

POST
/api/scheduled-maintenance-template/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {
    "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications."
  }
}

Ответ

{
  "count": 107
}
POST/api/scheduled-maintenance-template

Создать Scheduled Maintenance Template

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

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

POST
/api/scheduled-maintenance-template
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
    "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications.",
    "templateName": "Database Upgrade Template",
    "title": "Scheduled Database Maintenance - PostgreSQL Upgrade",
    "changeMonitorStatusToId": "d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a"
  }
}

Ответ

{
  "_id": "377a1d30-28fe-11f1-b591-3fdcef396aba",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "slug": "database-upgrade-template",
  "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications.",
  "templateName": "Database Upgrade Template",
  "title": "Scheduled Database Maintenance - PostgreSQL Upgrade"
}
PUT/api/scheduled-maintenance-template/:id

Обновить по ID

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

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

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

POST/api/scheduled-maintenance-template/:id/update-item
GET/api/scheduled-maintenance-template/:id/update-item

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

PUT
/api/scheduled-maintenance-template/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "templateDescription": "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications.",
    "templateName": "Database Upgrade Template",
    "title": "Scheduled Database Maintenance - PostgreSQL Upgrade"
  }
}

Ответ

{}
DELETE/api/scheduled-maintenance-template/:id

Удалить по ID

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

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

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

POST/api/scheduled-maintenance-template/:id/delete-item
GET/api/scheduled-maintenance-template/:id/delete-item

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

DELETE
/api/scheduled-maintenance-template/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY

Ответ

{}

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

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

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

Нужны для чтения Scheduled Maintenance Template

  • Project Owner
  • Project Admin
  • Project Member
  • Read Scheduled Maintenance Template
  • Read All Project Resources

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

Нужны для создания Scheduled Maintenance Template

  • Project Owner
  • Project Admin
  • Project Member
  • Create Scheduled Maintenance Template

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

Нужны для обновления Scheduled Maintenance Template

  • Project Owner
  • Project Admin
  • Project Member
  • Edit Scheduled Maintenance Template

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

Нужны для удаления Scheduled Maintenance Template

  • Project Owner
  • Project Admin
  • Project Member
  • Delete Scheduled Maintenance Template