Monitor Custom Field
Manage custom fields for your monitor
Модель Monitor Custom Field
Свойства
- Имя
_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
- Имя
name- Тип
- TextОбязательно
- Описание
Any friendly name of this object
- Имя
description- Тип
- Long Text
- Описание
Friendly description of this custom field that will help you remember
- Имя
customFieldType- Тип
- Custom Field Type
- Описание
Is this field Text, Number or Boolean?
- Имя
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)
/api/monitor-custom-field/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Monitor Custom Field». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Monitor Custom Field, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/monitor-custom-field/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"name": true,
"projectId": true,
"createdByUserId": true,
"customFieldType": true,
"description": true
},
"query": {
"name": "Check Interval"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "377477e3-28fe-11f1-b591-3fdcef396aba",
"name": "Check Interval",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Number",
"description": "This field specifies how often the monitor should perform health checks (in minutes)"
},
{
"_id": "377477e4-28fe-11f1-b591-3fdcef396aba",
"name": "Check Interval",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Number",
"description": "This field specifies how often the monitor should perform health checks (in minutes)"
},
{
"_id": "377477e5-28fe-11f1-b591-3fdcef396aba",
"name": "Check Interval",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Number",
"description": "This field specifies how often the monitor should perform health checks (in minutes)"
}
]
}/api/monitor-custom-field/:id/get-itemПолучить по ID
Возвращает объект «Monitor Custom Field» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/monitor-custom-field/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"name": true,
"projectId": true,
"createdByUserId": true,
"customFieldType": true,
"description": true
}
}Ответ
{
"_id": "377477e3-28fe-11f1-b591-3fdcef396aba",
"name": "Check Interval",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Number",
"description": "This field specifies how often the monitor should perform health checks (in minutes)"
}/api/monitor-custom-field/countКоличество
Возвращает количество ваших объектов «Monitor Custom Field».
Необязательное тело запроса
query- Чтобы фильтровать Monitor Custom Field, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/monitor-custom-field/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"name": "Check Interval"
}
}Ответ
{
"count": 107
}/api/monitor-custom-fieldСоздать Monitor Custom Field
Создаёт новый объект.
Запрос создания
POST/api/monitor-custom-fieldContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"name": "Check Interval",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Number",
"description": "This field specifies how often the monitor should perform health checks (in minutes)"
}
}Ответ
{
"_id": "377477e3-28fe-11f1-b591-3fdcef396aba",
"name": "Check Interval",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Number",
"description": "This field specifies how often the monitor should perform health checks (in minutes)"
}/api/monitor-custom-field/:idОбновить по ID
Обновляет объект по ID.
Альтернативные методы
Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:
Запрос обновления
PUT/api/monitor-custom-field/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"name": "Check Interval",
"description": "This field specifies how often the monitor should perform health checks (in minutes)"
}
}Ответ
{}/api/monitor-custom-field/:idУдалить по ID
Удаляет объект по ID.
Альтернативные методы
Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:
Запрос удаления
DELETE/api/monitor-custom-field/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Ответ
{}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Monitor Custom Field
Project OwnerProject AdminProject MemberRead Monitor Custom FieldRead All Project Resources
Права на создание
Нужны для создания Monitor Custom Field
Project OwnerProject AdminCreate Monitor Custom Field
Права на обновление
Нужны для обновления Monitor Custom Field
Project OwnerProject AdminEdit Monitor Custom Field
Права на удаление
Нужны для удаления Monitor Custom Field
Project OwnerProject AdminDelete Monitor Custom Field