Scheduled Maintenance Custom Field
Manage custom fields for your scheduled event
Модель Scheduled Maintenance 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/scheduled-maintenance-custom-field/get-listСписок
Этот метод возвращает постраничный список ваших объектов «Scheduled Maintenance Custom Field». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать Scheduled Maintenance Custom Field, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/scheduled-maintenance-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": "Maintenance Window"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "37790bc0-28fe-11f1-b591-3fdcef396aba",
"name": "Maintenance Window",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Text",
"description": "This field indicates the maintenance window type (Planned, Emergency, Routine)"
},
{
"_id": "37790bc1-28fe-11f1-b591-3fdcef396aba",
"name": "Maintenance Window",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Text",
"description": "This field indicates the maintenance window type (Planned, Emergency, Routine)"
},
{
"_id": "37790bc2-28fe-11f1-b591-3fdcef396aba",
"name": "Maintenance Window",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Text",
"description": "This field indicates the maintenance window type (Planned, Emergency, Routine)"
}
]
}/api/scheduled-maintenance-custom-field/:id/get-itemПолучить по ID
Возвращает объект «Scheduled Maintenance Custom Field» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/scheduled-maintenance-custom-field/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"name": true,
"projectId": true,
"createdByUserId": true,
"customFieldType": true,
"description": true
}
}Ответ
{
"_id": "37790bc0-28fe-11f1-b591-3fdcef396aba",
"name": "Maintenance Window",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Text",
"description": "This field indicates the maintenance window type (Planned, Emergency, Routine)"
}/api/scheduled-maintenance-custom-field/countКоличество
Возвращает количество ваших объектов «Scheduled Maintenance Custom Field».
Необязательное тело запроса
query- Чтобы фильтровать Scheduled Maintenance Custom Field, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/scheduled-maintenance-custom-field/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"name": "Maintenance Window"
}
}Ответ
{
"count": 107
}/api/scheduled-maintenance-custom-fieldСоздать Scheduled Maintenance Custom Field
Создаёт новый объект.
Запрос создания
POST/api/scheduled-maintenance-custom-fieldContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"name": "Maintenance Window",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Text",
"description": "This field indicates the maintenance window type (Planned, Emergency, Routine)"
}
}Ответ
{
"_id": "37790bc0-28fe-11f1-b591-3fdcef396aba",
"name": "Maintenance Window",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a3f2b1c0-d9e8-4f5a-8b7c-6d5e4f3a2b1c",
"customFieldType": "Text",
"description": "This field indicates the maintenance window type (Planned, Emergency, Routine)"
}/api/scheduled-maintenance-custom-field/:idОбновить по ID
Обновляет объект по ID.
Альтернативные методы
Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:
Запрос обновления
PUT/api/scheduled-maintenance-custom-field/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"name": "Maintenance Window",
"description": "This field indicates the maintenance window type (Planned, Emergency, Routine)"
}
}Ответ
{}/api/scheduled-maintenance-custom-field/:idУдалить по ID
Удаляет объект по ID.
Альтернативные методы
Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:
Запрос удаления
DELETE/api/scheduled-maintenance-custom-field/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Ответ
{}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения Scheduled Maintenance Custom Field
Project OwnerProject AdminProject MemberRead Scheduled Maintenance Custom FieldRead All Project Resources
Права на создание
Нужны для создания Scheduled Maintenance Custom Field
Project OwnerProject AdminCreate Scheduled Maintenance Custom Field
Права на обновление
Нужны для обновления Scheduled Maintenance Custom Field
Project OwnerProject AdminEdit Scheduled Maintenance Custom Field
Права на удаление
Нужны для удаления Scheduled Maintenance Custom Field
Project OwnerProject AdminDelete Scheduled Maintenance Custom Field