Ресурс

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)

GETorPOST/api/alert-custom-field/get-list

Список

Этот метод возвращает постраничный список ваших объектов «Alert Custom Field». По умолчанию на странице до десяти записей.

Необязательные query-параметры

  • limit
    число
    Сколько объектов вернуть. По умолчанию 10, максимум 100
  • skip
    число
    Сколько объектов пропустить (для пагинации)

Необязательное тело запроса

Запрос списка

POST
/api/alert-custom-field/get-list?skip=0&limit=10
Заголовки
Content-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)"
    }
  ]
}
GETorPOST/api/alert-custom-field/:id/get-item

Получить по ID

Возвращает объект «Alert Custom Field» по идентификатору.

  • id
    строка
    ID объекта

Необязательное тело запроса

  • select
    По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.

Запрос одного объекта

POST
/api/alert-custom-field/:id/get-item
Заголовки
Content-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)"
}
POST/api/alert-custom-field/count

Количество

Возвращает количество ваших объектов «Alert Custom Field».

Необязательное тело запроса

Запрос количества

POST
/api/alert-custom-field/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {
    "name": "Priority Level"
  }
}

Ответ

{
  "count": 107
}
POST/api/alert-custom-field

Создать Alert Custom Field

Создаёт новый объект.

Запрос создания

POST
/api/alert-custom-field
Заголовки
Content-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)"
}
PUT/api/alert-custom-field/:id

Обновить по ID

Обновляет объект по ID.

Альтернативные методы

Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:

POST/api/alert-custom-field/:id/update-item
GET/api/alert-custom-field/:id/update-item

Запрос обновления

PUT
/api/alert-custom-field/:id
Заголовки
Content-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)"
  }
}

Ответ

{}
DELETE/api/alert-custom-field/:id

Удалить по ID

Удаляет объект по ID.

Альтернативные методы

Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:

POST/api/alert-custom-field/:id/delete-item
GET/api/alert-custom-field/:id/delete-item

Запрос удаления

DELETE
/api/alert-custom-field/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY

Ответ

{}

Права доступа

Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.

Права на чтение

Нужны для чтения Alert Custom Field

  • Project Owner
  • Project Admin
  • Project Member
  • Read Alert Custom Field
  • Read All Project Resources

Права на создание

Нужны для создания Alert Custom Field

  • Project Owner
  • Project Admin
  • Create Alert Custom Field

Права на обновление

Нужны для обновления Alert Custom Field

  • Project Owner
  • Project Admin
  • Edit Alert Custom Field

Права на удаление

Нужны для удаления Alert Custom Field

  • Project Owner
  • Project Admin
  • Delete Alert Custom Field