Scheduled Maintenance Event
Manage scheduled maintenance event for your project
Модель Scheduled Maintenance Event
Свойства
- Имя
_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- Тип
- TextОбязательно
- Описание
Title of this scheduled event.
- Имя
description- Тип
- Markdown
- Описание
Description of this scheduled event that will show up on Status Page. This is in markdown.
- Имя
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.
- Имя
currentScheduledMaintenanceState- Тип
- Scheduled Maintenance State
- Описание
Relation to Scheduled Maintenance State. The state the event currently is in.
- Имя
currentScheduledMaintenanceStateId- Тип
- Object IDОбязательно
- Описание
Scheduled Maintenance State ID. The state the event currently is 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.
- Имя
startsAt- Тип
- DateОбязательно
- Описание
When does this event start?
- Имя
endsAt- Тип
- DateОбязательно
- Описание
When does this event end?
- Имя
subscriberNotificationStatusMessage- Тип
- Very Long Text
- Описание
Status message for subscriber notifications when event is scheduled - includes success messages, failure reasons, or skip reasons
- Имя
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?
- Имя
nextSubscriberNotificationBeforeTheEventAt- Тип
- Date
- Описание
When will the next notification to subscribers be sent out?
- Имя
scheduledMaintenanceNumber- Тип
- Number
- Описание
Scheduled Maintenance Number
- Имя
scheduledMaintenanceNumberWithPrefix- Тип
- Text
- Описание
Scheduled maintenance number with prefix (e.g., 'SM-42' or '#42')
- Имя
isVisibleOnStatusPage- Тип
- Boolean
- Описание
Should this incident be visible on the status page?
/api/scheduled-maintenance/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Scheduled Maintenance Event». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Scheduled Maintenance Event, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/scheduled-maintenance/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"currentScheduledMaintenanceStateId": true,
"projectId": true,
"title": true,
"changeMonitorStatusToId": true,
"createdByUserId": true
},
"query": {
"title": "Database Migration and Server Upgrade"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "377932d0-28fe-11f1-b591-3fdcef396aba",
"currentScheduledMaintenanceStateId": "c3d4e5f6-a7b8-9012-cdef-3456789012ab",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"title": "Database Migration and Server Upgrade",
"changeMonitorStatusToId": "d4e5f6a7-b8c9-0123-def4-56789012abcd",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
{
"_id": "377932d1-28fe-11f1-b591-3fdcef396aba",
"currentScheduledMaintenanceStateId": "c3d4e5f6-a7b8-9012-cdef-3456789012ab",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"title": "Database Migration and Server Upgrade",
"changeMonitorStatusToId": "d4e5f6a7-b8c9-0123-def4-56789012abcd",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
{
"_id": "377932d2-28fe-11f1-b591-3fdcef396aba",
"currentScheduledMaintenanceStateId": "c3d4e5f6-a7b8-9012-cdef-3456789012ab",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"title": "Database Migration and Server Upgrade",
"changeMonitorStatusToId": "d4e5f6a7-b8c9-0123-def4-56789012abcd",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
]
}/api/scheduled-maintenance/:id/get-itemПолучить по ID
Возвращает объект «Scheduled Maintenance Event» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/scheduled-maintenance/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"currentScheduledMaintenanceStateId": true,
"projectId": true,
"title": true,
"changeMonitorStatusToId": true,
"createdByUserId": true
}
}Ответ
{
"_id": "377932d0-28fe-11f1-b591-3fdcef396aba",
"currentScheduledMaintenanceStateId": "c3d4e5f6-a7b8-9012-cdef-3456789012ab",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"title": "Database Migration and Server Upgrade",
"changeMonitorStatusToId": "d4e5f6a7-b8c9-0123-def4-56789012abcd",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}/api/scheduled-maintenance/countКоличество
Возвращает количество ваших объектов «Scheduled Maintenance Event».
Необязательное тело запроса
query- Чтобы фильтровать Scheduled Maintenance Event, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/scheduled-maintenance/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"title": "Database Migration and Server Upgrade"
}
}Ответ
{
"count": 107
}/api/scheduled-maintenanceСоздать Scheduled Maintenance Event
Создаёт новый объект.
Запрос создания
POST/api/scheduled-maintenanceContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"currentScheduledMaintenanceStateId": "c3d4e5f6-a7b8-9012-cdef-3456789012ab",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"title": "Database Migration and Server Upgrade",
"changeMonitorStatusToId": "d4e5f6a7-b8c9-0123-def4-56789012abcd",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Ответ
{
"_id": "377932d0-28fe-11f1-b591-3fdcef396aba",
"currentScheduledMaintenanceStateId": "c3d4e5f6-a7b8-9012-cdef-3456789012ab",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"title": "Database Migration and Server Upgrade",
"changeMonitorStatusToId": "d4e5f6a7-b8c9-0123-def4-56789012abcd",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}/api/scheduled-maintenance/:idОбновить по ID
Обновляет объект по ID.
Альтернативные методы
Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:
Запрос обновления
PUT/api/scheduled-maintenance/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"currentScheduledMaintenanceStateId": "c3d4e5f6-a7b8-9012-cdef-3456789012ab",
"title": "Database Migration and Server Upgrade",
"changeMonitorStatusToId": "d4e5f6a7-b8c9-0123-def4-56789012abcd"
}
}Ответ
{}/api/scheduled-maintenance/:idУдалить по ID
Удаляет объект по ID.
Альтернативные методы
Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:
Запрос удаления
DELETE/api/scheduled-maintenance/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Ответ
{}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Scheduled Maintenance Event
Project OwnerProject AdminProject MemberRead Scheduled MaintenanceRead All Project Resources
Права на создание
Нужны для создания Scheduled Maintenance Event
Project OwnerProject AdminProject MemberCreate Scheduled Maintenance
Права на обновление
Нужны для обновления Scheduled Maintenance Event
Project OwnerProject AdminProject MemberEdit Scheduled Maintenance
Права на удаление
Нужны для удаления Scheduled Maintenance Event
Project OwnerProject AdminProject MemberDelete Scheduled Maintenance