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