Ресурс

Incident SLA

Track SLA status and deadlines for incidents

Модель Incident SLA

Свойства

  • Имя
    _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

  • Имя
    incident
    Тип
    Incident
    Описание

    The incident this SLA record is tracking

  • Имя
    incidentId
    Тип
    Object IDОбязательно
    Описание

    ID of the incident this SLA record is tracking

  • Имя
    incidentSlaRule
    Тип
    Incident SLA Rule
    Описание

    The SLA rule that was applied to this incident

  • Имя
    incidentSlaRuleId
    Тип
    Object IDОбязательно
    Описание

    ID of the SLA rule that was applied to this incident

  • Имя
    responseDeadline
    Тип
    Date
    Описание

    The deadline by which the incident must be acknowledged to meet the SLA

  • Имя
    resolutionDeadline
    Тип
    Date
    Описание

    The deadline by which the incident must be resolved to meet the SLA

  • Имя
    status
    Тип
    TextОбязательно
    Описание

    Current SLA status (On Track, At Risk, Breached, Met)

  • Имя
    respondedAt
    Тип
    Date
    Описание

    The actual time when the incident was acknowledged

  • Имя
    resolvedAt
    Тип
    Date
    Описание

    The actual time when the incident was resolved

  • Имя
    lastInternalNoteReminderSentAt
    Тип
    Date
    Описание

    The last time an internal note reminder was sent

  • Имя
    lastPublicNoteReminderSentAt
    Тип
    Date
    Описание

    The last time a public note reminder was sent

  • Имя
    breachNotificationSentAt
    Тип
    Date
    Описание

    The time when breach notification was sent to incident owners

  • Имя
    slaStartedAt
    Тип
    DateОбязательно
    Описание

    The time when SLA tracking started (usually the incident declaredAt time)

  • Имя
    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/incident-sla/get-list

Список

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

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

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

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

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

POST
/api/incident-sla/get-list?skip=0&limit=10
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "incidentId": true,
    "incidentSlaRuleId": true,
    "projectId": true,
    "slaStartedAt": true,
    "status": true
  },
  "query": {
    "status": "Example status"
  },
  "sort": {
    "createdAt": -1
  }
}

Ответ

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "3771b8c3-28fe-11f1-b591-3fdcef396aba",
      "incidentId": "550e8400-e29b-41d4-a716-446655440000",
      "incidentSlaRuleId": "550e8400-e29b-41d4-a716-446655440000",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "slaStartedAt": "2024-01-15T10:30:00.000Z",
      "status": "Example status"
    },
    {
      "_id": "3771b8c4-28fe-11f1-b591-3fdcef396aba",
      "incidentId": "550e8400-e29b-41d4-a716-446655440000",
      "incidentSlaRuleId": "550e8400-e29b-41d4-a716-446655440000",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "slaStartedAt": "2024-01-15T10:30:00.000Z",
      "status": "Example status"
    },
    {
      "_id": "3771b8c5-28fe-11f1-b591-3fdcef396aba",
      "incidentId": "550e8400-e29b-41d4-a716-446655440000",
      "incidentSlaRuleId": "550e8400-e29b-41d4-a716-446655440000",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "slaStartedAt": "2024-01-15T10:30:00.000Z",
      "status": "Example status"
    }
  ]
}
GETorPOST/api/incident-sla/:id/get-item

Получить по ID

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

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

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

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

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

POST
/api/incident-sla/:id/get-item
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "incidentId": true,
    "incidentSlaRuleId": true,
    "projectId": true,
    "slaStartedAt": true,
    "status": true
  }
}

Ответ

{
  "_id": "3771b8c3-28fe-11f1-b591-3fdcef396aba",
  "incidentId": "550e8400-e29b-41d4-a716-446655440000",
  "incidentSlaRuleId": "550e8400-e29b-41d4-a716-446655440000",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "slaStartedAt": "2024-01-15T10:30:00.000Z",
  "status": "Example status"
}
POST/api/incident-sla/count

Количество

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

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

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

POST
/api/incident-sla/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {
    "status": "Example status"
  }
}

Ответ

{
  "count": 107
}
POST/api/incident-sla

Создать Incident SLA

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

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

POST
/api/incident-sla
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "incidentId": "550e8400-e29b-41d4-a716-446655440000",
    "incidentSlaRuleId": "550e8400-e29b-41d4-a716-446655440000",
    "projectId": "550e8400-e29b-41d4-a716-446655440000",
    "slaStartedAt": "2024-01-15T10:30:00.000Z",
    "status": "Example status"
  }
}

Ответ

{
  "_id": "3771b8c3-28fe-11f1-b591-3fdcef396aba",
  "incidentId": "550e8400-e29b-41d4-a716-446655440000",
  "incidentSlaRuleId": "550e8400-e29b-41d4-a716-446655440000",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "slaStartedAt": "2024-01-15T10:30:00.000Z",
  "status": "Example status"
}
PUT/api/incident-sla/:id

Обновить по ID

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

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

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

POST/api/incident-sla/:id/update-item
GET/api/incident-sla/:id/update-item

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

PUT
/api/incident-sla/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "status": "Example status",
    "breachNotificationSentAt": "2024-01-15T10:30:00.000Z",
    "lastInternalNoteReminderSentAt": "2024-01-15T10:30:00.000Z"
  }
}

Ответ

{}
DELETE/api/incident-sla/:id

Удалить по ID

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

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

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

POST/api/incident-sla/:id/delete-item
GET/api/incident-sla/:id/delete-item

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

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

Ответ

{}

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

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

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

Нужны для чтения Incident SLA

  • Project Owner
  • Project Admin
  • Project Member
  • Read Incident SLA
  • Read All Project Resources

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

Нужны для создания Incident SLA

  • Project Owner
  • Project Admin
  • Create Incident SLA

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

Нужны для обновления Incident SLA

  • Project Owner
  • Project Admin
  • Edit Incident SLA

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

Нужны для удаления Incident SLA

  • Project Owner
  • Project Admin
  • Delete Incident SLA