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?
/api/scheduled-maintenance-template/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Scheduled Maintenance Template». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Scheduled Maintenance Template, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/scheduled-maintenance-template/get-list?skip=0&limit=10Content-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"
}
]
}/api/scheduled-maintenance-template/:id/get-itemПолучить по ID
Возвращает объект «Scheduled Maintenance Template» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/scheduled-maintenance-template/:id/get-itemContent-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"
}/api/scheduled-maintenance-template/countКоличество
Возвращает количество ваших объектов «Scheduled Maintenance Template».
Необязательное тело запроса
query- Чтобы фильтровать Scheduled Maintenance Template, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/scheduled-maintenance-template/countContent-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
}/api/scheduled-maintenance-templateСоздать Scheduled Maintenance Template
Создаёт новый объект.
Запрос создания
POST/api/scheduled-maintenance-templateContent-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"
}/api/scheduled-maintenance-template/:idОбновить по ID
Обновляет объект по ID.
Альтернативные методы
Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:
Запрос обновления
PUT/api/scheduled-maintenance-template/:idContent-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"
}
}Ответ
{}/api/scheduled-maintenance-template/:idУдалить по ID
Удаляет объект по ID.
Альтернативные методы
Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:
Запрос удаления
DELETE/api/scheduled-maintenance-template/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Ответ
{}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Scheduled Maintenance Template
Project OwnerProject AdminProject MemberRead Scheduled Maintenance TemplateRead All Project Resources
Права на создание
Нужны для создания Scheduled Maintenance Template
Project OwnerProject AdminProject MemberCreate Scheduled Maintenance Template
Права на обновление
Нужны для обновления Scheduled Maintenance Template
Project OwnerProject AdminProject MemberEdit Scheduled Maintenance Template
Права на удаление
Нужны для удаления Scheduled Maintenance Template
Project OwnerProject AdminProject MemberDelete Scheduled Maintenance Template