Status Page Resource
Add resources like monitors to your status page
Модель Status Page Resource
Свойства
- Имя
_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
- Описание
Relation to Status Page Resource in which this object belongs
- Имя
statusPageId- Тип
- Object IDОбязательно
- Описание
ID of your Status Page resource where this object belongs
- Имя
monitor- Тип
- Monitor
- Описание
Relation to Monitor Resource in which this object belongs
- Имя
monitorId- Тип
- Object ID
- Описание
Relation to Monitor ID Resource in which this object belongs
- Имя
monitorGroup- Тип
- Monitor Group
- Описание
Relation to Monitor Group Resource in which this object belongs
- Имя
monitorGroupId- Тип
- Object ID
- Описание
Relation to Monitor Group ID Resource in which this object belongs
- Имя
statusPageGroup- Тип
- Status Page Group
- Описание
Does this monitor belong to a status page group? If so - which one is it?
- Имя
statusPageGroupId- Тип
- Object ID
- Описание
Does this monitor belong to a status page group?
- Имя
displayName- Тип
- TextОбязательно
- Описание
Display name of the monitor on the Status Page
- Имя
displayDescription- Тип
- Markdown
- Описание
Display description of the monitor on the Status Page. This is in markdown format.
- Имя
displayTooltip- Тип
- Long Text
- Описание
Tooltip of the monitor on the Status Page
- Имя
showCurrentStatus- Тип
- Boolean
- Описание
Show current status like offline, operational or degraded.
- Имя
showUptimePercent- Тип
- Boolean
- Описание
Show uptime percent of this monitor for the last 90 days
- Имя
uptimePercentPrecision- Тип
- Text
- Описание
Precision of uptime percent of this monitor for the last 90 days
- Имя
showStatusHistoryChart- Тип
- Boolean
- Описание
Show a 90 day uptime history of this monitor
- Имя
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)
- Имя
order- Тип
- Number
- Описание
Order / Priority of this resource
/api/status-page-resource/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Status Page Resource». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Status Page Resource, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/status-page-resource/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"displayName": true,
"projectId": true,
"statusPageId": true,
"createdByUserId": true,
"displayDescription": true
},
"query": {
"displayName": "API Server"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "377cdc50-28fe-11f1-b591-3fdcef396aba",
"displayName": "API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"statusPageId": "f6a7b8c9-d0e1-2345-6789-abcdef012345",
"createdByUserId": "d0e1f2a3-b4c5-6789-abcd-ef0123456789",
"displayDescription": "Main API server handling all REST requests"
},
{
"_id": "377cdc51-28fe-11f1-b591-3fdcef396aba",
"displayName": "API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"statusPageId": "f6a7b8c9-d0e1-2345-6789-abcdef012345",
"createdByUserId": "d0e1f2a3-b4c5-6789-abcd-ef0123456789",
"displayDescription": "Main API server handling all REST requests"
},
{
"_id": "377cdc52-28fe-11f1-b591-3fdcef396aba",
"displayName": "API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"statusPageId": "f6a7b8c9-d0e1-2345-6789-abcdef012345",
"createdByUserId": "d0e1f2a3-b4c5-6789-abcd-ef0123456789",
"displayDescription": "Main API server handling all REST requests"
}
]
}/api/status-page-resource/:id/get-itemПолучить по ID
Возвращает объект «Status Page Resource» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/status-page-resource/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"displayName": true,
"projectId": true,
"statusPageId": true,
"createdByUserId": true,
"displayDescription": true
}
}Ответ
{
"_id": "377cdc50-28fe-11f1-b591-3fdcef396aba",
"displayName": "API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"statusPageId": "f6a7b8c9-d0e1-2345-6789-abcdef012345",
"createdByUserId": "d0e1f2a3-b4c5-6789-abcd-ef0123456789",
"displayDescription": "Main API server handling all REST requests"
}/api/status-page-resource/countКоличество
Возвращает количество ваших объектов «Status Page Resource».
Необязательное тело запроса
query- Чтобы фильтровать Status Page Resource, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/status-page-resource/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"displayName": "API Server"
}
}Ответ
{
"count": 107
}/api/status-page-resourceСоздать Status Page Resource
Создаёт новый объект.
Запрос создания
POST/api/status-page-resourceContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"displayName": "API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"statusPageId": "f6a7b8c9-d0e1-2345-6789-abcdef012345",
"createdByUserId": "d0e1f2a3-b4c5-6789-abcd-ef0123456789",
"displayDescription": "Main API server handling all REST requests"
}
}Ответ
{
"_id": "377cdc50-28fe-11f1-b591-3fdcef396aba",
"displayName": "API Server",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"statusPageId": "f6a7b8c9-d0e1-2345-6789-abcdef012345",
"createdByUserId": "d0e1f2a3-b4c5-6789-abcd-ef0123456789",
"displayDescription": "Main API server handling all REST requests"
}/api/status-page-resource/:idОбновить по ID
Обновляет объект по ID.
Альтернативные методы
Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:
Запрос обновления
PUT/api/status-page-resource/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"displayName": "API Server",
"displayDescription": "Main API server handling all REST requests",
"monitorGroupId": "b8c9d0e1-f2a3-4567-89ab-cdef01234567"
}
}Ответ
{}/api/status-page-resource/:idУдалить по ID
Удаляет объект по ID.
Альтернативные методы
Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:
Запрос удаления
DELETE/api/status-page-resource/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Ответ
{}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Status Page Resource
Project OwnerProject AdminProject MemberRead Status Page ResourceRead All Project Resources
Права на создание
Нужны для создания Status Page Resource
Project OwnerProject AdminProject MemberCreate Status Page Resource
Права на обновление
Нужны для обновления Status Page Resource
Project OwnerProject AdminProject MemberEdit Status Page Resource
Права на удаление
Нужны для удаления Status Page Resource
Project OwnerProject AdminProject MemberDelete Status Page Resource