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